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