simple binding sample
This commit is contained in:
23
PacticeSolution/SimpleDataBinding/MainWindow.xaml
Normal file
23
PacticeSolution/SimpleDataBinding/MainWindow.xaml
Normal file
@@ -0,0 +1,23 @@
|
||||
<Window x:Class="SimpleDataBinding.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:SimpleDataBinding"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="180" Width="300">
|
||||
<Window.DataContext>
|
||||
<local:Cities/>
|
||||
</Window.DataContext>
|
||||
|
||||
<StackPanel Orientation="Vertical" Margin="20">
|
||||
<Label HorizontalAlignment="Center" FontSize="20" FontWeight="Bold" Margin="0 0 0 20"
|
||||
Content="Which city do you love?"/>
|
||||
<CheckBox Content="SEOUL" IsChecked="{Binding Seoul}"/>
|
||||
<CheckBox Content="JEJOO" IsChecked="{Binding Jejoo}"/>
|
||||
<CheckBox Content="INCHEON" IsChecked="{Binding Incheon}"/>
|
||||
<Button VerticalAlignment="Center" HorizontalAlignment="Center"
|
||||
Content="Submit"
|
||||
Click="Button_Click"/>
|
||||
</StackPanel>
|
||||
</Window>
|
Reference in New Issue
Block a user