annotate SilverlightGlimpse/SilverlightValidation/Views/UserListView.xaml @ 74:a79e235177f5

Working version
author Steven Hollidge <stevenhollidge@hotmail.com>
date Mon, 23 Apr 2012 20:29:55 +0100
parents 177a9d1eba10
children 86ed4919b126
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
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
26 <StackPanel Grid.Row="1"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
27 Grid.Column="1"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
28 HorizontalAlignment="Right"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
29 Orientation="Horizontal">
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
30 <Button x:Name="btnAdd"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
31 Width="60"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
32 Command="{Binding AddCommand}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
33 Content="Add"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
34 Style="{StaticResource ButtonStyle}" />
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
35 <Button x:Name="btnDelete"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
36 Width="60"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
37 Command="{Binding DeleteCommand}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
38 Content="Delete"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
39 Style="{StaticResource ButtonStyle}" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
40 </StackPanel>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
41
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
42 <controls:DataGrid x:Name="dataGridUsers"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
43 Grid.Row="2"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
44 Grid.Column="1"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
45 AutoGenerateColumns="False"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
46 ItemsSource="{Binding Data}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
47 SelectedItem="{Binding SelectedItem,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
48 Mode=TwoWay}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
49 SelectionMode="Single">
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
50 <controls:DataGrid.Columns>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
51 <controls:DataGridTextColumn x:Name="dgtcUsername"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
52 Width="125"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
53 Binding="{Binding Username,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
54 Mode=TwoWay,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
55 ValidatesOnNotifyDataErrors=True,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
56 NotifyOnValidationError=True}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
57 Header="Username" />
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
58 <controls:DataGridTemplateColumn x:Name="dgtcPassword"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
59 Width="125"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
60 Header="Password">
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
61 <sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
62 <DataTemplate>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
63 <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
64 </DataTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
65 </sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
66 </controls:DataGridTemplateColumn>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
67 <controls:DataGridTextColumn x:Name="dgtcEmail"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
68 Width="150"
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
69 Binding="{Binding Email,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
70 Mode=TwoWay,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
71 ValidatesOnNotifyDataErrors=True,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
72 NotifyOnValidationError=True}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
73 Header="Email" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
74
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
75 <controls:DataGridTemplateColumn Width="150" Header="Date of Birth">
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 <DataTemplate>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
78 <sdk:DatePicker x:Name="dpDateOfBirth"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
79 KeyDown="DatePicker_KeyDown"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
80 SelectedDate="{Binding DateOfBirth,
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
81 Mode=TwoWay,
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
82 ValidatesOnNotifyDataErrors=True,
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
83 NotifyOnValidationError=True}" />
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
84 </DataTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
85 </sdk:DataGridTemplateColumn.CellTemplate>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
86 </controls:DataGridTemplateColumn>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
87 <controls:DataGridTextColumn x:Name="dgtcDescription"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
88 Width="150"
71
96e6fbd70f49 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 69
diff changeset
89 Binding="{Binding INCORRECTPATH,
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
90 Mode=TwoWay,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
91 ValidatesOnNotifyDataErrors=True,
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
92 NotifyOnValidationError=True}"
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
93 Header="Description" />
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
94 </controls:DataGrid.Columns>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
95 </controls:DataGrid>
72
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
96
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
97 <Button x:Name="btnThrowException"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
98 Grid.Row="4"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
99 Grid.Column="1"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
100 Width="150"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
101 Height="50"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
102 HorizontalAlignment="Center"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
103 Content="Throw Exception"
177a9d1eba10 Latest version
Steven Hollidge <stevenhollidge@hotmail.com>
parents: 71
diff changeset
104 Click="btnThrowException_Click"/>
69
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
105 </Grid>
a0bcd783e612 Latest work
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff changeset
106 </UserControl>