<Window x:Class="SparkClient.LoginWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:local="clr-namespace:SparkClient"
        xmlns:hc="https://handyorg.github.io/handycontrol"
        mc:Ignorable="d"
        WindowStyle="None"
        AllowsTransparency="True"
        Background="Transparent"
        ResizeMode="NoResize"
        Title="LoginWindow" Height="450" Width="450"        
        KeyDown="PasswordBox_KeyDown">
    <Grid MouseLeftButtonDown="Grid_MouseLeftButtonDown">
        <Border CornerRadius="20"
                BorderThickness="1"
                BorderBrush="LightGray"
                Background="White">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="80"/>
                    <RowDefinition Height="20"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                    <RowDefinition Height="Auto"/>
                </Grid.RowDefinitions>
                <!-- 标题 -->
                <Grid Grid.Row="1" >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                   <Grid Grid.Column="1">
                       <Grid.ColumnDefinitions>
                           <ColumnDefinition Width="Auto"/>
                           <ColumnDefinition Width="Auto"/>
                       </Grid.ColumnDefinitions>
                       <Image Grid.Column="0" Source="/Resource/Images/icon_200.png" Width="70"/>
                       <TextBlock Grid.Column="1" Text="{StaticResource LoginWindowTitle}" 
                                  FontSize="32" FontWeight="Bold" VerticalAlignment="Center">
                           <TextBlock.Foreground>
                               <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                   <GradientStop Color="#58b9e3" Offset="0"/>
                                   <GradientStop Color="#349ad0" Offset="1"/>
                               </LinearGradientBrush>
                           </TextBlock.Foreground>
                       </TextBlock>
                   </Grid>
                </Grid>
                <!-- 账号输入 -->
                <Grid Grid.Row="3" >
                    <Border Height="40" CornerRadius="20" BorderBrush="#ebeef5" 
                            BorderThickness="1" Background="#ebeef5" 
                            Margin="40 10" Padding="20 0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="30" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="30" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Column="0" Width="25" Height="25" Source="Resource/Images/UIResource/08-2.png" />
                            <hc:TextBox Grid.Column="1"  Grid.ColumnSpan="2"  BorderThickness="0" FontSize="18" HorizontalAlignment="Stretch" 
                                       Background="Transparent" Padding="5 0" hc:InfoElement.ShowClearButton="True"
                                       VerticalAlignment="Stretch" TextAlignment="Left" x:Name="AccountTextBox" MaxLength="20"
                                       hc:InfoElement.Placeholder="{StaticResource LoginWindowAccount}" 
                            />
                            <!-- <Image Grid.Column="2" Width="25" Height="25" Source="Resource/Images/UIResource/08-4.png" MouseLeftButtonDown="UIElement_OnMouseLeftButtonDown"  /> -->
                        </Grid>
                    </Border>
                </Grid>
                <!-- 密码输入 -->
                <Grid Grid.Row="4" >
                    <Border Height="40" CornerRadius="20" BorderBrush="#ebeef5" 
                            BorderThickness="1" Background="#ebeef5"
                            Margin="40 10" Padding="20 0">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="30" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="30" />
                            </Grid.ColumnDefinitions>
                            <Image Grid.Column="0" Width="25" Height="25" Source="Resource/Images/UIResource/08-3.png" />
                            <hc:PasswordBox Grid.Column="1" Grid.ColumnSpan="2" ShowEyeButton="True"   BorderThickness="0" x:Name="PasswordBox"
                                            FontSize="18" HorizontalAlignment="Stretch" hc:InfoElement.Necessary="True"   Background="Transparent" 
                                            MaxLength="20"
                                            hc:InfoElement.Placeholder="{StaticResource LoginWindowPassword}" />
                            
                        </Grid>
                    </Border>
                </Grid>
                <!-- 记住密码 -->
                <CheckBox Grid.Row="5" Content="{StaticResource LoginWindowRemember}" IsChecked="True"
                          Background="#8ea4c9" Foreground="#8c8c8c" FontSize="16" x:Name="IsRemberPassword"
                          Margin="45 5"/>
                <!-- 登录按钮 -->
                <Button x:Name="ConfirmButton" Grid.Row="6" Padding="0" Margin="0 10 0 10" Height="50" 
                        Width="360 " Click="ConfirmButton_Click"
                        BorderThickness="0" Background="Transparent" FocusVisualStyle="{x:Null}">
                    <Border
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Margin="0 0 0 0"
                        Padding="10, 10"
                        Width="360" 
                        BorderThickness="0"
                        CornerRadius="20">
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <GradientStop Color="#61bde2" Offset="0"/>
                                <GradientStop Color="#53abd9" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <TextBlock FontSize="18" Text="{StaticResource LoginWindowLogin}" TextAlignment="Center" Foreground="#ffffff"></TextBlock>
                    </Border>
                </Button>
                <Button x:Name="CloseButton" Grid.Row="7" Padding="0" Margin="0 0 0 20" Height="50" 
                        Width="360 " Click="CloseButton_OnClick"
                        BorderThickness="0" Background="Transparent" FocusVisualStyle="{x:Null}">
                    <Border
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Margin="0 0 0 0"
                        Padding="10, 10"
                        Width="360" 
                        BorderThickness="0"
                        CornerRadius="20">
                        <Border.Background>
                            <LinearGradientBrush StartPoint="0,0" EndPoint="0,1">
                                <GradientStop Color="#e3687d" Offset="0"/>
                                <GradientStop Color="#d95464" Offset="1"/>
                            </LinearGradientBrush>
                        </Border.Background>
                        <TextBlock FontSize="18" Text="{StaticResource LoginWindowExit}" TextAlignment="Center" Foreground="#ffffff"></TextBlock>
                    </Border>
                </Button>
                <!-- 联系我们 -->
                <TextBlock Grid.Row="8" Text="{StaticResource LoginWindowForgot}" TextAlignment="Center"
                           Margin="20,0" FontSize="14" Foreground="#8e8e8e" Padding="0 10 0  0" VerticalAlignment="Bottom"/>
            </Grid>
        </Border>
    </Grid>
</Window>