1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:wpfApplication1="clr-namespace:WpfApplication1" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
<Grid d:DataContext="{d:DesignData }">
<Grid.Resources>
<wpfApplication1:MainWindow x:Key="MyDataSource"/>
</Grid.Resources>
<ComboBox Name="ComboBox1" Margin="97,58,0,0" VerticalAlignment="Top" Width="120" SelectionChanged="ComboBox_SelectionChanged">
<ComboBoxItem Content="111
" HorizontalAlignment="Left" Width="118"/>
<ComboBoxItem Content="222
" HorizontalAlignment="Left" Width="118"/>
<ComboBoxItem Content="333
" HorizontalAlignment="Left" Width="118"/>
</ComboBox>
<ComboBox Name="ComboBox2" HorizontalAlignment="Left" Height="20" Margin="209,112,0,0" VerticalAlignment="Top" Width="167"
IsEnabled ="{Binding ComboboxEnabled}"
SelectedItem="{Binding SelectedValue, Mode=TwoWay}">
<ComboBoxItem Content="AAA" HorizontalAlignment="Left" Width="165"/>
<ComboBoxItem Content="BBB" HorizontalAlignment="Left" Width="165"/>
<ComboBoxItem Content="CCC" HorizontalAlignment="Left" Width="165"/>
</ComboBox>
</Grid>
</Window> |