annotate SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml @ 102:db05a55e3536

INPC tests added
author stevenhollidge <stevenhollidge@hotmail.com>
date Sun, 06 May 2012 12:13:29 +0100
parents 86ed4919b126
children
rev   line source
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
1 <UserControl x:Class="SilverlightValidation.Views.UserListView"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
4 xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
5 xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
6 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
7 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
8 d:DesignHeight="500"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
9 d:DesignWidth="725"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
10 mc:Ignorable="d">
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
11
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
12 <Grid x:Name="LayoutRoot">
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
13 <Grid.RowDefinitions>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
14 <RowDefinition Height="30" />
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
15 <RowDefinition Height="40" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
16 <RowDefinition Height="300" />
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
17 <RowDefinition Height="30" />
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
18 <RowDefinition Height="100" />
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
19 </Grid.RowDefinitions>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
20 <Grid.ColumnDefinitions>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
21 <ColumnDefinition Width="*" />
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
22 <ColumnDefinition Width="725" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
23 <ColumnDefinition Width="*" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
24 </Grid.ColumnDefinitions>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
25
77
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
26 <Button x:Name="btnThrowException"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
27 Grid.Row="1"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
28 Grid.Column="1"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
29 Width="120"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
30 HorizontalAlignment="Left"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
31 Click="btnThrowException_Click"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
32 Content="Throw Exception"
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
33 Style="{StaticResource ButtonStyle}" />
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
34
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
35 <StackPanel Grid.Row="1"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
36 Grid.Column="1"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
37 HorizontalAlignment="Right"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
38 Orientation="Horizontal">
77
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
39
86ed4919b126 Working version!
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 72
diff changeset
40
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
41 <Button x:Name="btnAdd"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
42 Width="60"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
43 Command="{Binding AddCommand}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
44 Content="Add"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
45 Style="{StaticResource ButtonStyle}" />
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
46 <Button x:Name="btnDelete"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
47 Width="60"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
48 Command="{Binding DeleteCommand}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
49 Content="Delete"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
50 Style="{StaticResource ButtonStyle}" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
51 </StackPanel>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
52
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
53 <controls:DataGrid x:Name="dataGridUsers"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
54 Grid.Row="2"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
55 Grid.Column="1"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
56 AutoGenerateColumns="False"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
57 ItemsSource="{Binding Data}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
58 SelectedItem="{Binding SelectedItem,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
59 Mode=TwoWay}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
60 SelectionMode="Single">
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
61 <controls:DataGrid.Columns>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
62 <controls:DataGridTextColumn x:Name="dgtcUsername"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
63 Width="125"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
64 Binding="{Binding Username,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
65 Mode=TwoWay,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
66 ValidatesOnNotifyDataErrors=True,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
67 NotifyOnValidationError=True}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
68 Header="Username" />
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
69 <controls:DataGridTemplateColumn x:Name="dgtcPassword"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
70 Width="125"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
71 Header="Password">
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
72 <sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
73 <DataTemplate>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
74 <PasswordBox x:Name="pbPassword" Password="{Binding Password, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
75 </DataTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
76 </sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
77 </controls:DataGridTemplateColumn>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
78 <controls:DataGridTextColumn x:Name="dgtcEmail"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
79 Width="150"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
80 Binding="{Binding Email,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
81 Mode=TwoWay,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
82 ValidatesOnNotifyDataErrors=True,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
83 NotifyOnValidationError=True}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
84 Header="Email" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
85
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
86 <controls:DataGridTemplateColumn Width="150" Header="Date of Birth">
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
87 <sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
88 <DataTemplate>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
89 <sdk:DatePicker x:Name="dpDateOfBirth"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
90 KeyDown="DatePicker_KeyDown"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
91 SelectedDate="{Binding DateOfBirth,
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
92 Mode=TwoWay,
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
93 ValidatesOnNotifyDataErrors=True,
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
94 NotifyOnValidationError=True}" />
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
95 </DataTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
96 </sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
97 </controls:DataGridTemplateColumn>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
98 <controls:DataGridTextColumn x:Name="dgtcDescription"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
99 Width="150"
71
96e6fbd70f49 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 69
diff changeset
100 Binding="{Binding INCORRECTPATH,
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
101 Mode=TwoWay,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
102 ValidatesOnNotifyDataErrors=True,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
103 NotifyOnValidationError=True}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
104 Header="Description" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
105 </controls:DataGrid.Columns>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
106 </controls:DataGrid>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
107 </Grid>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
108 </UserControl>