69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 <c:ChildWindow x:Class="SilverlightValidation.Views.UserView"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
2 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
3 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
4 xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
5 xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
6 Title="Add User"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
7 Width="500"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 Height="400">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 <Grid x:Name="LayoutRoot" Background="White">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 <Grid.RowDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13 <RowDefinition Height="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 <RowDefinition Height="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 <RowDefinition Height="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 <RowDefinition Height="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 <RowDefinition Height="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 <RowDefinition Height="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 <RowDefinition Height="50" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 <RowDefinition Height="120" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 </Grid.RowDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 <Grid.ColumnDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23 <ColumnDefinition Width="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 <ColumnDefinition Width="100" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 <ColumnDefinition Width="300" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
26 <ColumnDefinition Width="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
27 <ColumnDefinition Width="30" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
28 </Grid.ColumnDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
29
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
30 <TextBlock Grid.Row="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
31 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
32 Style="{StaticResource LabelStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
33 Text="Username:" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
34
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
35 <TextBox x:Name="tbUsername"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
36 Grid.Row="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
37 Grid.Column="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
38 Style="{StaticResource TextBoxStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
39 Text="{Binding Username,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
40 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
41 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
42 NotifyOnValidationError=True}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
43
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
44 <sdk:DescriptionViewer Grid.Row="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
45 Grid.Column="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
46 Width="20"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
47 Description="Required"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
48 Target="{Binding ElementName=tbUsername}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
49
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
50 <TextBlock Grid.Row="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
51 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
52 Style="{StaticResource LabelStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
53 Text="Password:" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
54
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
55 <PasswordBox x:Name="tbPassword"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
56 Grid.Row="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
57 Grid.Column="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
58 Password="{Binding Password,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
59 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
60 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
61 NotifyOnValidationError=True}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
62 Style="{StaticResource PasswordBoxStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
63
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
64 <sdk:DescriptionViewer Grid.Row="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
65 Grid.Column="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
66 Width="20"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
67 Description="Required"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
68 Target="{Binding ElementName=tbPassword}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
69
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
70 <TextBlock Grid.Row="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
71 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
72 Style="{StaticResource LabelStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
73 Text="Email:" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
74
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
75 <TextBox x:Name="tbEmail"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
76 Grid.Row="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
77 Grid.Column="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
78 Style="{StaticResource TextBoxStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
79 Text="{Binding Email,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
80 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
81 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
82 NotifyOnValidationError=True}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
83
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
84 <sdk:DescriptionViewer Grid.Row="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
85 Grid.Column="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
86 Width="20"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
87 Description="Required"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
88 Target="{Binding ElementName=tbEmail}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
89
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
90 <TextBlock Grid.Row="4"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
91 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
92 Style="{StaticResource LabelStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
93 Text="Date of Birth:" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
94
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
95 <sdk:DatePicker x:Name="dpDateOfBirth"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
96 Grid.Row="4"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
97 Grid.Column="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
98 KeyDown="DatePicker_KeyDown"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
99 SelectedDate="{Binding DateOfBirth,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
100 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
101 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
102 NotifyOnValidationError=True}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
103 Style="{StaticResource DatePickerStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
104 <sdk:DescriptionViewer Grid.Row="4"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
105 Grid.Column="3"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
106 Width="20"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
107 Description="Required"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
108 Target="{Binding ElementName=dpDateOfBirth}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
109
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
110 <TextBlock x:Name="tbDescription"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
111 Grid.Row="5"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
112 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
113 Style="{StaticResource LabelStyle}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
114 Text="Description:" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
115
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
116 <TextBox Grid.Row="5"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
117 Grid.Column="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
118 Style="{StaticResource TextBoxStyle}"
|
77
|
119 Text="{Binding DONEITGAIN}" />
|
69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
120 <StackPanel Grid.Row="6"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
121 Grid.Column="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
122 HorizontalAlignment="Right"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
123 Orientation="Horizontal">
|
77
|
124 <Button x:Name="btnThrowException"
|
|
125 Width="120"
|
|
126 Margin="0,0,50,0"
|
|
127 Click="btnThrowException_OnClick"
|
|
128 Content="Throw Exception"
|
|
129 Style="{StaticResource ButtonStyle}" />
|
69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
130 <Button Command="{Binding OkCommand}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
131 Content="OK"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
132 Style="{StaticResource ButtonStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
133 <Button Command="{Binding CancelCommand}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
134 Content="Cancel"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
135 Style="{StaticResource ButtonStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
136 </StackPanel>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
137
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
138 <sdk:ValidationSummary Grid.Row="7"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
139 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
140 Grid.ColumnSpan="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
141 Style="{StaticResource ValidationSummaryStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
142
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
143 </Grid>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
144 </c:ChildWindow> |