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