comparison SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml @ 78:dd6bcd2535b6

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