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