WPF学习随笔

时间:2021-08-26 17:26:49

内容控件

Padding内边距,Margin外边距

1.ScrollViewer滚动条控件

<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Disabled">

LineUp方法上翻一行 LineDown LineRight LineLeft   PageUp 上翻一页

2.GroupBox组合框控件

<GroupBox Header="groupBox联系" Name="group1" Margin="10">

<StackPanel Name="stackPanl" Margin="15">
                        <RadioButton Name="radionButton1" Content="dian1"/>
                        <RadioButton Name="radionButton2" Content="dian2"/>
                    </StackPanel>

</GroupBox>

3.TabControl标签页控件

<Grid>
            <TabControl Name="tableContorl">
                <TabItem Name="d3" Header="tableContorlianxi">
                 
                    <StackPanel Name="stackPanl" Margin="15">
                        <RadioButton Name="radionButton1" Content="dian1"/>
                        <RadioButton Name="radionButton2" Content="dian2"/>
                    </StackPanel>
                </TabItem>
            
                <TabItem Name="tablContorl2" Header="三年内都是美女都是美女" IsSelected="True">
                    <StackPanel Name="stackPanel1" Margin="35">
                        <CheckBox Name="checkBox1" Content="卡萨丁库拉索"/>
                        <CheckBox Name="checkBox2" Content="卡萨丁库拉索3"/>
                        <CheckBox Name="checkBox3" Content="卡萨丁库拉索2"/>
                        <CheckBox Name="checkBox4" Content="卡萨丁库拉索1"/>
                    </StackPanel>
                </TabItem>
            </TabControl>
        </Grid>

WPF学习随笔

修饰控件

1。border边框控件

<Border Margin="5" Padding="5" Background="LightYellow" BorderBrush="Black"
                BorderThickness="5" CornerRadius="8,8,8,8" VerticalAlignment="Top" >
            <StackPanel Margin="15" Name="stackPanel">
                <CheckBox Name="cheeckBox1" Content="下雨1"/>
                <CheckBox Name="cheeckBox2" Content="下雨2"/>
                <CheckBox Name="cheeckBox3" Content="下雨3"/>
                <CheckBox Name="cheeckBox4" Content="下雨4"/>
            </StackPanel>
        </Border>

WPF学习随笔