当前位置:首页 > 主打产品 >

WPF(ContentControl和ItemsControl)

WPF(ContentControl和ItemsControl)

<Window x:Class="TestOfContentControl.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<StackPanel>
<Button Margin="5" >
<TextBlock Text="Hello" />
</Button>

<Button Margin="5" >
<Image Source="j.png" Width="30" Height="30" />
</Button>

<GroupBox Margin="10" BorderBrush="Gray" >
<GroupBox.Header>
<Image Source="j.png" Width="20" Height="20" />
</GroupBox.Header>

<TextBlock TextWrapping="WrapWithOverflow" Margin="5"
Text="一棵树,一匹马,站群软件,一头大象和一只鸡在一起,专题系统,打一种日常用品。"/>
</GroupBox>
</StackPanel>
</Window>

<Window x:Class="TestOfContentControl.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<StackPanel>
<Button Margin="5" >
<TextBlock Text="Hello" />
</Button>

<Button Margin="5" >
<Image Source="j.png" Width="30" Height="30" />
</Button>

<GroupBox Margin="10" BorderBrush="Gray" >
<GroupBox.Header>
<Image Source="j.png" Width="20" Height="20" />
</GroupBox.Header>

<TextBlock TextWrapping="WrapWithOverflow" Margin="5"
Text="一棵树,一匹马,一头大象和一只鸡在一起,打一种日常用品。"/>
</GroupBox>
</StackPanel>
</Window>
[html] view plaincopyprint?
<Window x:Class="TestOfItemsControl.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">

<StackPanel>
<ListBox Margin="5" >
<CheckBox x:Name="checkBoxTim" Content="Tim" />
<CheckBox x:Name="checkBoxTom" Content="Tom" />
<CheckBox x:Name="checkBoxBruce" Content="Bruce" />
<Button x:Name="buttonMess" Content="Mess" />
<Button x:Name="buttonOwen" Content="Owen" />
<Button x:Name="buttonVictor" Content="Victor" Click="buttonVictor_Click"/>
</ListBox>
<ListBox x:Name="empLists" >
</ListBox>
</StackPanel>
</Window>

企业建站2800元起,携手武汉肥猫科技,做一个有见地的颜值派!更多优惠请戳:潜江SEO http://qianjiang.raoyu.net

上一篇:文章字数和SEO排名

下一篇:最后一页