<Window x:Class="ComboBox使用方法.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="comboBox使用示例" Height="238" Width="356">
<StackPanel Width="286">
<Label Margin="5,20,5,0">请选择一种软件</Label>
<ComboBox Margin="10,5,0,5" IsEditable="true" Width="276" HorizontalAlignment="Center" Height="33" SelectionChanged="ComboBox_SelectionChanged_1">
<ComboBoxItem TextSearch.Text="Microsoft Visual Studio 2008">
<StackPanel Orientation="Horizontal" Margin="2">
<Image Source="images\vs.png"/>
<TextBlock VerticalAlignment="Center">Microsoft Visual Studio 2012</TextBlock>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem TextSearch.Text="Windows Internet Exploer 7">
<StackPanel Orientation="Horizontal" Margin="2">
<Image Source="images\ie.jpg"/>
<TextBlock VerticalAlignment="Center">Windows Internet Exploer 7</TextBlock>
</StackPanel>
</ComboBoxItem>
<ComboBoxItem TextSearch.Text="Windows Live Messenger">
<StackPanel Orientation="Horizontal" Margin="2">
<Image Source="images\msn.jpg"/>
<TextBlock VerticalAlignment="Center">Windows Live Messenger</TextBlock>
</StackPanel>
</ComboBoxItem>
</ComboBox>
<Label Name="lbl" FontWeight="Bold"></Label>
</StackPanel>
</Window>
ComboBox使用方法
最新推荐文章于 2024-05-10 15:31:30 发布