<Page x:Class="XFEToolBox.Client.Views.Pages.Popups.LoginPopupPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:XFEToolBox.WpfCore.Controls;assembly=XFEToolBox.WpfCore"
Background="Transparent" Loaded="Page_Loaded">
<Page.Resources>
<Style x:Key="ModeButtonStyle" TargetType="RadioButton">
<Setter Property="Height" Value="34"/>
<Setter Property="Foreground" Value="#707086"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="11.5"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="ModeSurface" Margin="2" Background="{TemplateBinding Background}" CornerRadius="9">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ModeSurface" Property="Background" Value="#E7E7F8"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ModeSurface" Property="Background" Value="#8989DF"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FieldLabel" TargetType="TextBlock">
<Setter Property="Foreground" Value="#69697C"/>
<Setter Property="FontSize" Value="10.5"/>
<Setter Property="Margin" Value="2,0,0,5"/>
</Style>
</Page.Resources>
<Grid x:Name="AccountSurface" Margin="30,14,30,22" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<TranslateTransform X="0"/>
</Grid.RenderTransform>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Padding="2" Background="#F1F1F8" CornerRadius="11">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<RadioButton x:Name="LoginModeButton" Content="登录" GroupName="AccountMode" IsChecked="True"
Style="{StaticResource ModeButtonStyle}" Click="ModeButton_Click"/>
<RadioButton x:Name="RegisterModeButton" Grid.Column="1" Content="注册" GroupName="AccountMode"
Style="{StaticResource ModeButtonStyle}" Click="ModeButton_Click"/>
</Grid>
</Border>
<StackPanel Grid.Row="1" Margin="1,12,1,12">
<TextBlock x:Name="FormTitleText" Text="欢迎回来" FontSize="17" FontWeight="Bold" Foreground="#3B3B51"/>
<TextBlock x:Name="FormSubtitleText" Text="登录 XFE 工具箱账户" FontSize="9.5" Foreground="#9292A5" Margin="0,3,0,0"/>
</StackPanel>
<Grid Grid.Row="2">
<StackPanel x:Name="LoginPanel">
<TextBlock Text="账号" Style="{StaticResource FieldLabel}"/>
<controls:TextEditor x:Name="LoginAccountTextBox" Height="39" Padding="11,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="请输入账号" HintForeground="#77778A" HintTextMargin="0"/>
<TextBlock Text="密码" Style="{StaticResource FieldLabel}" Margin="2,10,0,5"/>
<controls:PasswordEditor x:Name="LoginPasswordBox" Height="39" Padding="11,0,4,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="请输入密码" HintForeground="#77778A" HintTextMargin="0"
KeyDown="PasswordBox_KeyDown"/>
</StackPanel>
<StackPanel x:Name="RegisterPanel" Visibility="Collapsed">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="账号" Style="{StaticResource FieldLabel}"/>
<controls:TextEditor x:Name="RegisterAccountTextBox" Height="39" Padding="10,0" FontSize="12"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="至少 3 位" HintForeground="#77778A" HintTextMargin="0"/>
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Text="昵称" Style="{StaticResource FieldLabel}"/>
<controls:TextEditor x:Name="RegisterNickNameTextBox" Height="39" Padding="10,0" FontSize="12"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="显示名称" HintForeground="#77778A" HintTextMargin="0"/>
</StackPanel>
</Grid>
<TextBlock Text="密码" Style="{StaticResource FieldLabel}" Margin="2,10,0,5"/>
<controls:PasswordEditor x:Name="RegisterPasswordBox" Height="39" Padding="11,0,4,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="至少 8 位" HintForeground="#77778A" HintTextMargin="0"/>
<TextBlock Text="确认密码" Style="{StaticResource FieldLabel}" Margin="2,10,0,5"/>
<controls:PasswordEditor x:Name="RegisterConfirmPasswordBox" Height="39" Padding="11,0,4,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="再次输入" HintForeground="#77778A" HintTextMargin="0"
KeyDown="PasswordBox_KeyDown"/>
</StackPanel>
</Grid>
<TextBlock x:Name="StatusText" Grid.Row="3" Margin="2,6,2,5" Foreground="#C65353"
FontSize="10.5" TextWrapping="Wrap" VerticalAlignment="Bottom"/>
<Button x:Name="SubmitButton" Grid.Row="4" Content="登录" controls:ButtonAssist.IsPrimary="True" Height="42" FontSize="13"
Click="SubmitButton_Click"/>
</Grid>
</Page>
<Page x:Class="XFEToolBox.Client.Views.Pages.Popups.LoginPopupPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:XFEToolBox.WpfCore.Controls;assembly=XFEToolBox.WpfCore"
Background="Transparent" Loaded="Page_Loaded">
<Page.Resources>
<Style x:Key="ModeButtonStyle" TargetType="RadioButton">
<Setter Property="Height" Value="34"/>
<Setter Property="Foreground" Value="#707086"/>
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontSize" Value="11.5"/>
<Setter Property="FontWeight" Value="SemiBold"/>
<Setter Property="Cursor" Value="Hand"/>
<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="ModeSurface" Margin="2" Background="{TemplateBinding Background}" CornerRadius="9">
<ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="ModeSurface" Property="Background" Value="#E7E7F8"/>
</Trigger>
<Trigger Property="IsChecked" Value="True">
<Setter TargetName="ModeSurface" Property="Background" Value="#8989DF"/>
<Setter Property="Foreground" Value="White"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
<Style x:Key="FieldLabel" TargetType="TextBlock">
<Setter Property="Foreground" Value="#69697C"/>
<Setter Property="FontSize" Value="10.5"/>
<Setter Property="Margin" Value="2,0,0,5"/>
</Style>
</Page.Resources>
<Grid x:Name="AccountSurface" Margin="30,14,30,22" RenderTransformOrigin="0.5,0.5">
<Grid.RenderTransform>
<TranslateTransform X="0"/>
</Grid.RenderTransform>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Padding="2" Background="#F1F1F8" CornerRadius="11">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<RadioButton x:Name="LoginModeButton" Content="登录" GroupName="AccountMode" IsChecked="True"
Style="{StaticResource ModeButtonStyle}" Click="ModeButton_Click"/>
<RadioButton x:Name="RegisterModeButton" Grid.Column="1" Content="注册" GroupName="AccountMode"
Style="{StaticResource ModeButtonStyle}" Click="ModeButton_Click"/>
</Grid>
</Border>
<StackPanel Grid.Row="1" Margin="1,12,1,12">
<TextBlock x:Name="FormTitleText" Text="欢迎回来" FontSize="17" FontWeight="Bold" Foreground="#3B3B51"/>
<TextBlock x:Name="FormSubtitleText" Text="登录 XFE 工具箱账户" FontSize="9.5" Foreground="#9292A5" Margin="0,3,0,0"/>
</StackPanel>
<Grid Grid.Row="2">
<StackPanel x:Name="LoginPanel">
<TextBlock Text="账号" Style="{StaticResource FieldLabel}"/>
<controls:TextEditor x:Name="LoginAccountTextBox" Height="39" Padding="11,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="请输入账号" HintForeground="#77778A" HintTextMargin="0"/>
<TextBlock Text="密码" Style="{StaticResource FieldLabel}" Margin="2,10,0,5"/>
<controls:PasswordEditor x:Name="LoginPasswordBox" Height="39" Padding="11,0,4,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="请输入密码" HintForeground="#77778A" HintTextMargin="0"
KeyDown="PasswordBox_KeyDown"/>
</StackPanel>
<StackPanel x:Name="RegisterPanel" Visibility="Collapsed">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="10"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<StackPanel>
<TextBlock Text="账号" Style="{StaticResource FieldLabel}"/>
<controls:TextEditor x:Name="RegisterAccountTextBox" Height="39" Padding="10,0" FontSize="12"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="至少 3 位" HintForeground="#77778A" HintTextMargin="0"/>
</StackPanel>
<StackPanel Grid.Column="2">
<TextBlock Text="昵称" Style="{StaticResource FieldLabel}"/>
<controls:TextEditor x:Name="RegisterNickNameTextBox" Height="39" Padding="10,0" FontSize="12"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="显示名称" HintForeground="#77778A" HintTextMargin="0"/>
</StackPanel>
</Grid>
<TextBlock Text="密码" Style="{StaticResource FieldLabel}" Margin="2,10,0,5"/>
<controls:PasswordEditor x:Name="RegisterPasswordBox" Height="39" Padding="11,0,4,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="至少 8 位" HintForeground="#77778A" HintTextMargin="0"/>
<TextBlock Text="确认密码" Style="{StaticResource FieldLabel}" Margin="2,10,0,5"/>
<controls:PasswordEditor x:Name="RegisterConfirmPasswordBox" Height="39" Padding="11,0,4,0" FontSize="12.5"
Foreground="#44445A" Background="#F8F8FC" EditorBorderBrush="#E2E2EE"
HintText="再次输入" HintForeground="#77778A" HintTextMargin="0"
KeyDown="PasswordBox_KeyDown"/>
</StackPanel>
</Grid>
<TextBlock x:Name="StatusText" Grid.Row="3" Margin="2,6,2,5" Foreground="#C65353"
FontSize="10.5" TextWrapping="Wrap" VerticalAlignment="Bottom"/>
<Button x:Name="SubmitButton" Grid.Row="4" Content="登录" controls:ButtonAssist.IsPrimary="True" Height="42" FontSize="13"
Click="SubmitButton_Click"/>
</Grid>
</Page>