69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
1 <UserControl x:Class="SilverlightValidation.Views.UserListView"
|
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:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data"
|
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:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
8 d:DesignHeight="400"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
9 d:DesignWidth="725"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
10 mc:Ignorable="d">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
11
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
12 <Grid x:Name="LayoutRoot">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
13 <Grid.RowDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
14 <RowDefinition Height="auto" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
15 <RowDefinition Height="40" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
16 <RowDefinition Height="300" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
17 </Grid.RowDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
18 <Grid.ColumnDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
19 <ColumnDefinition Width="auto" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
20 <ColumnDefinition Width="725" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
21 <ColumnDefinition Width="*" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
22 </Grid.ColumnDefinitions>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
23
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
24 <StackPanel Grid.Row="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
25 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
26 HorizontalAlignment="Right"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
27 Orientation="Horizontal">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
28 <Button Width="60"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
29 Command="{Binding AddCommand}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
30 Content="Add"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
31 Style="{StaticResource ButtonStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
32 <Button Width="60"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
33 Command="{Binding DeleteCommand}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
34 Content="Delete"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
35 Style="{StaticResource ButtonStyle}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
36 </StackPanel>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
37
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
38 <controls:DataGrid Grid.Row="2"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
39 Grid.Column="1"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
40 AutoGenerateColumns="False"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
41 ItemsSource="{Binding Data}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
42 SelectedItem="{Binding SelectedItem,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
43 Mode=TwoWay}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
44 SelectionMode="Single">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
45 <controls:DataGrid.Columns>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
46 <controls:DataGridTextColumn Width="125"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
47 Binding="{Binding Username,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
48 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
49 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
50 NotifyOnValidationError=True}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
51 Header="Username" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
52 <controls:DataGridTemplateColumn Width="125" Header="Password">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
53 <sdk:DataGridTemplateColumn.CellTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
54 <DataTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
55 <PasswordBox Password="{Binding Password, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
56 </DataTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
57 </sdk:DataGridTemplateColumn.CellTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
58 </controls:DataGridTemplateColumn>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
59 <controls:DataGridTextColumn Width="150"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
60 Binding="{Binding Email,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
61 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
62 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
63 NotifyOnValidationError=True}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
64 Header="Email" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
65
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
66 <controls:DataGridTemplateColumn Width="150" Header="Date of Birth">
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
67 <sdk:DataGridTemplateColumn.CellTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
68 <DataTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
69 <sdk:DatePicker KeyDown="DatePicker_KeyDown" SelectedDate="{Binding DateOfBirth, Mode=TwoWay, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
70 </DataTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
71 </sdk:DataGridTemplateColumn.CellTemplate>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
72 </controls:DataGridTemplateColumn>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
73 <controls:DataGridTextColumn Width="150"
|
71
|
74 Binding="{Binding INCORRECTPATH,
|
69
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
75 Mode=TwoWay,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
76 ValidatesOnNotifyDataErrors=True,
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
77 NotifyOnValidationError=True}"
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
78 Header="Description" />
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
79 </controls:DataGrid.Columns>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
80 </controls:DataGrid>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
81 </Grid>
|
Steven Hollidge <stevenhollidge@hotmail.com>
parents:
diff
changeset
|
82 </UserControl>
|