Advertisement
Tosker

MainWindow.xaml

May 17th, 2018
2,641
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 1.29 KB | None | 0 0
  1. <Window x:Class="NotifyChangeExample.MainWindow"
  2.        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.        xmlns:local="clr-namespace:NotifyChangeExample"
  7.        mc:Ignorable="d"
  8.        Title="NotifyPropertyChange Example Application" Height="450" Width="800">
  9.     <Grid Background="{Binding Background.Color}">
  10.         <DockPanel LastChildFill="false">
  11.             <StackPanel Width="150" DockPanel.Dock="Top">
  12.                 <TextBlock Text="{Binding Person.Name, StringFormat=Welcome {0}}"/>
  13.                 <TextBox Text="{Binding Person.Name, Mode=OneWayToSource, UpdateSourceTrigger=PropertyChanged}"/>
  14.                 <Button Content="Submit"/>
  15.             </StackPanel>
  16.             <StackPanel HorizontalAlignment="Center" Orientation="Horizontal" DockPanel.Dock="Bottom">
  17.                 <Button Click="Red_Clicked">Red Background</Button>
  18.                 <Button Click="Blue_Clicked">Blue Background</Button>
  19.                 <Button Click="Yellow_Clicked">Yellow Background</Button>
  20.             </StackPanel>
  21.         </DockPanel>
  22.     </Grid>
  23. </Window>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement