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