annotate delete me/SilverlightValidation/Views/UserListView.xaml @ 76:441fdfce70a7

Working version!
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 22:05:53 +0100
parents 3591c26bd63e
children
rev   line source
59
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
1 <UserControl x:Class="SilverlightValidation.Views.UserListView"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
4 xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
6 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
7 xmlns:p="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
8 xmlns:s="clr-namespace:System;assembly=mscorlib"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
9 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
10 d:DesignHeight="400"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
11 d:DesignWidth="725"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
12 mc:Ignorable="d">
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
13
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
14 <Grid x:Name="LayoutRoot" Background="White">
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
15 <Grid.RowDefinitions>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
16 <RowDefinition Height="30" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
17 <RowDefinition Height="40" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
18 <RowDefinition Height="300" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
19 <RowDefinition Height="50" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
20 </Grid.RowDefinitions>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
21 <Grid.ColumnDefinitions>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
22 <ColumnDefinition Width="*" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
23 <ColumnDefinition Width="725" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
24 <ColumnDefinition Width="*" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
25 </Grid.ColumnDefinitions>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
26
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
27 <StackPanel Grid.Row="1"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
28 Grid.Column="1"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
29 HorizontalAlignment="Right"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
30 Orientation="Horizontal">
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
31 <Button Width="60"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
32 Command="{Binding AddCommand}"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
33 Content="Add"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
34 Style="{StaticResource ButtonStyle}" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
35 <Button Width="60"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
36 Command="{Binding CancelCommand}"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
37 Content="Delete"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
38 Style="{StaticResource ButtonStyle}" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
39 </StackPanel>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
40
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
41 <controls:DataGrid Grid.Row="2"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
42 Grid.Column="1"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
43 AutoGenerateColumns="False"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
44 ItemsSource="{Binding Data}"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
45 SelectedItem="{Binding SelectedItem}">
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
46 <controls:DataGrid.Columns>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
47 <controls:DataGridTextColumn Width="125"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
48 Binding="{Binding Username,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
49 Mode=TwoWay,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
50 ValidatesOnNotifyDataErrors=True,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
51 NotifyOnValidationError=True}"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
52 Header="Username" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
53 <controls:DataGridTemplateColumn Width="125" Header="Password">
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
54 <sdk:DataGridTemplateColumn.CellTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
55 <DataTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
56 <PasswordBox Password="{Binding Password, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
57 </DataTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
58 </sdk:DataGridTemplateColumn.CellTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
59 </controls:DataGridTemplateColumn>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
60 <controls:DataGridTextColumn Width="150"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
61 Binding="{Binding Email,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
62 Mode=TwoWay,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
63 ValidatesOnNotifyDataErrors=True,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
64 NotifyOnValidationError=True}"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
65 Header="Email" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
66
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
67 <controls:DataGridTemplateColumn Width="150" Header="Date of Birth">
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
68 <sdk:DataGridTemplateColumn.CellTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
69 <DataTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
70 <sdk:DatePicker KeyDown="DatePicker_KeyDown" SelectedDate="{Binding DateOfBirth, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
71 </DataTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
72 </sdk:DataGridTemplateColumn.CellTemplate>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
73 </controls:DataGridTemplateColumn>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
74 <controls:DataGridTextColumn Width="150"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
75 Binding="{Binding XXXDescription,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
76 Mode=TwoWay,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
77 ValidatesOnNotifyDataErrors=True,
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
78 NotifyOnValidationError=True}"
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
79 Header="Description" />
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
80 </controls:DataGrid.Columns>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
81 </controls:DataGrid>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
82 </Grid>
3591c26bd63e MVVMLight added
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
83 </UserControl>