Advertisement
jkmaster9918

LoginRegister.xaml

Jul 2nd, 2011
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 6.56 KB | None | 0 0
  1. <UserControl x:Class="SpaceTakeover.LoginRegisterPage"
  2.    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3.    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4.    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5.    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6.    mc:Ignorable="d" xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" d:DesignHeight="300" d:DesignWidth="400" Width="400" Height="300"
  7.    Background="{StaticResource BackgroundBrush}">
  8.     <Grid x:Name="LayoutRoot" Background="{StaticResource BackgroundBrush}">
  9.         <Grid.ColumnDefinitions>
  10.             <ColumnDefinition />
  11.             <ColumnDefinition />
  12.         </Grid.ColumnDefinitions>
  13.         <Grid.RowDefinitions>
  14.             <RowDefinition Height="77*" />
  15.             <RowDefinition Height="223*" />
  16.         </Grid.RowDefinitions>
  17.         <Image Source="{Binding Source={StaticResource Banner}}" Grid.ColumnSpan="2" Grid.Row="0" Grid.Column="0" Stretch="UniformToFill" Name="bannerMainPage" />
  18.         <!-- Begin Define Login Form-->
  19.         <Grid Name="LoginForm" Margin="10"  Grid.Row="1" Grid.Column="0" Background="DarkSlateBlue">
  20.             <Grid.ColumnDefinitions>
  21.                 <ColumnDefinition />
  22.                 <ColumnDefinition />
  23.             </Grid.ColumnDefinitions>
  24.             <Grid.RowDefinitions>
  25.                 <RowDefinition Height="Auto" />
  26.                 <RowDefinition Height="*" />
  27.                 <RowDefinition Height="*" />
  28.                 <RowDefinition Height="*" />
  29.             </Grid.RowDefinitions>
  30.             <TextBlock Name="LoginErrorText" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="2" Foreground="Red" FontWeight="Bold" />
  31.             <Border Grid.Row="0" Grid.RowSpan="4" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Black" BorderThickness="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
  32.             <TextBlock Grid.Row="1" Grid.Column="0" Text="Username:" Style="{StaticResource TextStyle}" />
  33.             <TextBox Grid.Column="1" Name="UsernameLogin" Style="{StaticResource TextBoxRegStyle}" MaxLength="15" Text="{Binding Path=LoginInfo.Username, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" Grid.Row="1" />
  34.             <TextBlock Grid.Row="2" Grid.Column="0" Text="Password:" VerticalAlignment="Center" HorizontalAlignment="Left"  Style="{StaticResource TextStyle}" />
  35.             <PasswordBox Grid.Row="2" Grid.Column="1" Name="Password" Style="{StaticResource PasswordBoxRegStyle}" Password="{Binding Path=LoginInfo.Password, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
  36.             <Button Grid.Column="0" Grid.ColumnSpan="2" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Center" Name="LoginButton" Command="{Binding Path=LoginCmd}" CommandParameter="{Binding ElementName=LoginErrorText}" Content="Login" />
  37.         </Grid>
  38.         <!-- End Define Login Form-->
  39.         <!-- Begin Define Registration Form-->
  40.         <Grid Name="RegistrationForm" Margin="10"  Grid.Row="1" Grid.Column="1" Background="DarkSlateBlue">
  41.             <Grid.ColumnDefinitions>
  42.                 <ColumnDefinition Width="*" />
  43.                 <ColumnDefinition Width="*" />
  44.             </Grid.ColumnDefinitions>
  45.             <Grid.RowDefinitions>
  46.                 <RowDefinition Height="Auto" />
  47.                 <RowDefinition Height="*" />
  48.                 <RowDefinition Height="*" />
  49.                 <RowDefinition Height="*" />
  50.                 <RowDefinition Height="*" />
  51.                 <RowDefinition Height="*" />
  52.                 <RowDefinition Height="*" />
  53.             </Grid.RowDefinitions>
  54.             <Border Grid.Row="0" Grid.RowSpan="7" Grid.Column="0" Grid.ColumnSpan="2" BorderBrush="Black" BorderThickness="3" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
  55.             <TextBlock Name="RegistrationErrorText" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="2" Foreground="Red" FontWeight="Bold" />
  56.             <TextBlock Text="Username:" Style="{StaticResource TextStyle}" Grid.Column="0" Grid.Row="1" />
  57.             <TextBox Name="UsernameRegister" Grid.Column="1" Style="{StaticResource TextBoxRegStyle}" MaxLength="15"  Text="{Binding Path=RegistrationData.Username, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" Grid.Row="1" />
  58.             <TextBlock Text="Password:" Style="{StaticResource TextStyle}" Grid.Column="0" Grid.Row="2" />
  59.             <PasswordBox Name="PasswordRegister" Style="{StaticResource PasswordBoxRegStyle}" Grid.Column="1" Grid.Row="2" Password="{Binding Path=RegistrationData.Password, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
  60.             <TextBlock Text="Re-Enter:" Style="{StaticResource TextStyle}" Grid.Column="0" Grid.Row="3" />
  61.             <PasswordBox Name="ReEnterPassword" Style="{StaticResource PasswordBoxRegStyle}" Grid.Column="1" Grid.Row="3" Password="{Binding Path=RegistrationData.ReEnterPassword, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
  62.             <TextBlock Style="{StaticResource TextStyle}" Text="Beta Key:" Grid.Column="0" Grid.Row="4" />
  63.             <PasswordBox Style="{StaticResource PasswordBoxRegStyle}" Grid.Column="1" Grid.Row="4" Name="BetaKey" Password="{Binding Path=RegistrationData.BetaKey, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
  64.             <TextBlock Style="{StaticResource TextStyle}" Text="Email:" Grid.Column="0" Grid.Row="5" />
  65.             <TextBox Name="Email" Style="{StaticResource TextBoxRegStyle}" Grid.Column="1" Grid.Row="5" Text="{Binding Path=RegistrationData.Email, Mode=TwoWay, ValidatesOnDataErrors=True,ValidatesOnExceptions=True, ValidatesOnNotifyDataErrors=True, NotifyOnValidationError=True}" />
  66.             <Button Name="RegisterButton" Grid.ColumnSpan="2" Grid.Row="6" VerticalAlignment="Center" HorizontalAlignment="Center" IsEnabled="{Binding Path=RegistrationData.RegisterEnabled, Mode=OneWay}" Command="{Binding Path=RegisterCmd}" CommandParameter="{Binding ElementName=RegistrationErrorText}" Content="Register" />
  67.         </Grid>
  68.         <!--End Define Registration Form-->
  69.     </Grid>
  70. </UserControl>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement