diff 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
line wrap: on
line diff
--- a/SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml	Mon Apr 23 22:06:05 2012 +0100
+++ b/SilverlightGlimpse/SilverlightValidation/Views/UserView.xaml	Mon Apr 23 22:43:53 2012 +0100
@@ -1,11 +1,7 @@
-<c:ChildWindow x:Class="SilverlightValidation.Views.UserView"
-               xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-               xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-               xmlns:c="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
-               xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"
-               Title="Add User"
-               Width="500"
-               Height="400">
+<UserControl x:Class="SilverlightValidation.Views.UserView"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk">
 
     <Grid x:Name="LayoutRoot" Background="White">
 
@@ -20,11 +16,11 @@
             <RowDefinition Height="120" />
         </Grid.RowDefinitions>
         <Grid.ColumnDefinitions>
-            <ColumnDefinition Width="30" />
+            <ColumnDefinition Width="*" />
             <ColumnDefinition Width="100" />
             <ColumnDefinition Width="300" />
             <ColumnDefinition Width="30" />
-            <ColumnDefinition Width="30" />
+            <ColumnDefinition Width="*" />
         </Grid.ColumnDefinitions>
 
         <TextBlock Grid.Row="1"
@@ -44,8 +40,7 @@
         <sdk:DescriptionViewer Grid.Row="1"
                                Grid.Column="3"
                                Width="20"
-                               Description="Required"
-                               Target="{Binding ElementName=tbUsername}" />
+                               Description="Required" />
 
         <TextBlock Grid.Row="2"
                    Grid.Column="1"
@@ -64,8 +59,7 @@
         <sdk:DescriptionViewer Grid.Row="2"
                                Grid.Column="3"
                                Width="20"
-                               Description="Required"
-                               Target="{Binding ElementName=tbPassword}" />
+                               Description="Required" />
 
         <TextBlock Grid.Row="3"
                    Grid.Column="1"
@@ -84,8 +78,7 @@
         <sdk:DescriptionViewer Grid.Row="3"
                                Grid.Column="3"
                                Width="20"
-                               Description="Required"
-                               Target="{Binding ElementName=tbEmail}" />
+                               Description="Required" />
 
         <TextBlock Grid.Row="4"
                    Grid.Column="1"
@@ -104,8 +97,7 @@
         <sdk:DescriptionViewer Grid.Row="4"
                                Grid.Column="3"
                                Width="20"
-                               Description="Required"
-                               Target="{Binding ElementName=dpDateOfBirth}" />
+                               Description="Required" />
 
         <TextBlock x:Name="tbDescription"
                    Grid.Row="5"
@@ -116,23 +108,16 @@
         <TextBox Grid.Row="5"
                  Grid.Column="2"
                  Style="{StaticResource TextBoxStyle}"
-                 Text="{Binding DONEITGAIN}" />
+                 Text="{Binding IncorectBindingPath}" />
         <StackPanel Grid.Row="6"
                     Grid.Column="2"
                     HorizontalAlignment="Right"
                     Orientation="Horizontal">
             <Button x:Name="btnThrowException"
                     Width="120"
-                    Margin="0,0,50,0"
                     Click="btnThrowException_OnClick"
                     Content="Throw Exception"
                     Style="{StaticResource ButtonStyle}" />
-            <Button Command="{Binding OkCommand}"
-                    Content="OK"
-                    Style="{StaticResource ButtonStyle}" />
-            <Button Command="{Binding CancelCommand}"
-                    Content="Cancel"
-                    Style="{StaticResource ButtonStyle}" />
         </StackPanel>
 
         <sdk:ValidationSummary Grid.Row="7"
@@ -141,4 +126,4 @@
                                Style="{StaticResource ValidationSummaryStyle}" />
 
     </Grid>
-</c:ChildWindow>
\ No newline at end of file
+</UserControl>
\ No newline at end of file