Mercurial > silverbladetech
diff SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml @ 69:a0bcd783e612
Latest work
author | Steven Hollidge <stevenhollidge@hotmail.com> |
---|---|
date | Mon, 23 Apr 2012 11:06:10 +0100 |
parents | |
children | 96e6fbd70f49 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml Mon Apr 23 11:06:10 2012 +0100 @@ -0,0 +1,82 @@ +<UserControl x:Class="SilverlightValidation.Views.UserListView" + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data" + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" + xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" + d:DesignHeight="400" + d:DesignWidth="725" + mc:Ignorable="d"> + + <Grid x:Name="LayoutRoot"> + <Grid.RowDefinitions> + <RowDefinition Height="auto" /> + <RowDefinition Height="40" /> + <RowDefinition Height="300" /> + </Grid.RowDefinitions> + <Grid.ColumnDefinitions> + <ColumnDefinition Width="auto" /> + <ColumnDefinition Width="725" /> + <ColumnDefinition Width="*" /> + </Grid.ColumnDefinitions> + + <StackPanel Grid.Row="1" + Grid.Column="1" + HorizontalAlignment="Right" + Orientation="Horizontal"> + <Button Width="60" + Command="{Binding AddCommand}" + Content="Add" + Style="{StaticResource ButtonStyle}" /> + <Button Width="60" + Command="{Binding DeleteCommand}" + Content="Delete" + Style="{StaticResource ButtonStyle}" /> + </StackPanel> + + <controls:DataGrid Grid.Row="2" + Grid.Column="1" + AutoGenerateColumns="False" + ItemsSource="{Binding Data}" + SelectedItem="{Binding SelectedItem, + Mode=TwoWay}" + SelectionMode="Single"> + <controls:DataGrid.Columns> + <controls:DataGridTextColumn Width="125" + Binding="{Binding Username, + Mode=TwoWay, + ValidatesOnNotifyDataErrors=True, + NotifyOnValidationError=True}" + Header="Username" /> + <controls:DataGridTemplateColumn Width="125" Header="Password"> + <sdk:DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <PasswordBox Password="{Binding Password, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" /> + </DataTemplate> + </sdk:DataGridTemplateColumn.CellTemplate> + </controls:DataGridTemplateColumn> + <controls:DataGridTextColumn Width="150" + Binding="{Binding Email, + Mode=TwoWay, + ValidatesOnNotifyDataErrors=True, + NotifyOnValidationError=True}" + Header="Email" /> + + <controls:DataGridTemplateColumn Width="150" Header="Date of Birth"> + <sdk:DataGridTemplateColumn.CellTemplate> + <DataTemplate> + <sdk:DatePicker KeyDown="DatePicker_KeyDown" SelectedDate="{Binding DateOfBirth, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" /> + </DataTemplate> + </sdk:DataGridTemplateColumn.CellTemplate> + </controls:DataGridTemplateColumn> + <controls:DataGridTextColumn Width="150" + Binding="{Binding Description, + Mode=TwoWay, + ValidatesOnNotifyDataErrors=True, + NotifyOnValidationError=True}" + Header="Description" /> + </controls:DataGrid.Columns> + </controls:DataGrid> + </Grid> +</UserControl>