<Windows:DataWindow x:Class="CatenaLogic.Examples.UI.Windows.RevertAndApplyWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Windows="clr-namespace:CatenaLogic.Windows;assembly=CatenaLogic.BlogArticles" xmlns:Input="clr-namespace:CatenaLogic.Examples.UI.Input" Title="Revert and apply"> <!-- Content --> <Grid DataContext="{Binding RelativeSource={RelativeSource AncestorType={x:Type Window}}, Path=RevertAndApplyObject}" > <!-- Row definitions --> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <!-- Column definitions --> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <!-- First name, notice that for the "old" style bindings to work, we have to set Mode to TwoWay --> <Label Grid.Row="0" Grid.Column="0" Content="First name:" /> <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding FirstName, Mode=TwoWay}" /> <!-- Last name, notice that for the "old" style bindings to work, we have to set Mode to TwoWay --> <Label Grid.Row="1" Grid.Column="0" Content="Last name:" /> <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding LastName, Mode=TwoWay}" /> <!-- Buttons --> <WrapPanel Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource RightAlignedButtonsWrapPanelStyle}"> <!-- Create state button --> <Button Command="Input:RevertAndApplyCommands.CreateState" Style="{StaticResource RightAlignedFixedSizeButtonStyle}" /> <!-- Revert button --> <Button Command="Input:RevertAndApplyCommands.Revert" Style="{StaticResource RightAlignedFixedSizeButtonStyle}" /> <!-- Apply button --> <Button Command="Input:RevertAndApplyCommands.Apply" Style="{StaticResource RightAlignedFixedSizeButtonStyle}" /> </WrapPanel> </Grid> </Windows:DataWindow>
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)