<Window x:Class="软件系统客户端Wpf.LoginWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Title="系统登录" Height="300" Width="500" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Loaded="Window_Loaded">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.CheckBox.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ListBox.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.PopupBox.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.RadioButton.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.TextBlock.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.ToggleButton.xaml" />
            </ResourceDictionary.MergedDictionaries>
            <Style TargetType="TextBlock" BasedOn="{StaticResource MaterialDesignCaptionTextBlock}" x:Key="Caption">
                <Setter Property="Opacity" Value=".68"></Setter>
            </Style>
        </ResourceDictionary>
    </Window.Resources>
    <Window.Background>
        <LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
            <GradientStop Color="AliceBlue" Offset="0"/>
            <GradientStop Color="White" Offset="1"/>
        </LinearGradientBrush>
    </Window.Background>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="auto"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel>
            <materialDesign:Card Padding="16" Margin="8" Background="Transparent">
                <TextBlock x:Name="TextBlockSoftName" TextAlignment="Center" FontSize="32" Style="{DynamicResource MaterialDesignTitleTextBlock}">[您的软件系统]</TextBlock>
            </materialDesign:Card>

            <Grid Margin="8,8,8,8">
                <Grid.RowDefinitions>
                    <RowDefinition Height="auto"></RowDefinition>
                    <RowDefinition Height="auto"></RowDefinition>
                    <RowDefinition Height="auto"></RowDefinition>
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="auto"></ColumnDefinition>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="*"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <materialDesign:PackIcon Grid.Row="0" Grid.Column="0" Kind="Account" Foreground="{Binding ElementName=NameTextBox, Path=BorderBrush}" 
                                         Margin="92,4,0,0"/>
                <TextBox Grid.Row="0" Grid.Column="1" Margin="0,2,0,2"
				    x:Name="NameTextBox" KeyDown="NameTextBox_KeyDown"
				    materialDesign:HintAssist.Hint="请输入名称">
                </TextBox>
                <materialDesign:PackIcon Grid.Row="1" Grid.Column="0" Kind="Key" Foreground="{Binding ElementName=PasswordBox, Path=BorderBrush}" HorizontalAlignment="Right"
                                         Margin="92,4,0,0"/>
                <PasswordBox Grid.Row="1" Grid.Column="1" Margin="0,2,0,2"
                     x:Name="PasswordBox" KeyDown="PasswordBox_KeyDown"
                     materialDesign:HintAssist.Hint="请输入密码" />
                <Button x:Name="LoginButton" Grid.Column="2" Grid.RowSpan="2" VerticalAlignment="Center" Style="{StaticResource MaterialDesignRaisedLightButton}" Width="100" Height="35"
                    Click="Button_Click">
                    登录系统
                </Button>
                <StackPanel Grid.Row="2" Grid.ColumnSpan="3" Orientation="Horizontal" Margin="92,8,8,8">
                    <ToggleButton x:Name="Remember" Style="{StaticResource MaterialDesignSwitchToggleButton}" VerticalAlignment="Center"
                          ToolTip="单击记住密码" Checked="ToggleButton_Checked" Unchecked="ToggleButton_Unchecked"/>
                    <TextBlock Grid.Column="1" Style="{StaticResource Caption}">是否记住密码？</TextBlock>
                </StackPanel>
            </Grid>


           

            <TextBlock x:Name="WindowToolTip" TextAlignment="Center" Visibility="Visible" Margin="0,3,0,0" Style="{StaticResource Caption}">正在连接服务器...</TextBlock>
        </StackPanel>


        
        <!--版本号及版权声明-->
        
        <Grid Grid.Row="1" Margin="8">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="auto"></ColumnDefinition>
                <ColumnDefinition Width="auto"></ColumnDefinition>
                <ColumnDefinition Width="*"></ColumnDefinition>
                <ColumnDefinition Width="auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Style="{StaticResource Caption}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown">版本号：</TextBlock>
            <TextBlock x:Name="TextBlockSoftVersion" Grid.Column="1" Style="{StaticResource Caption}" MouseLeftButtonDown="TextBlock_MouseLeftButtonDown">V1.0.0</TextBlock>
            <TextBlock x:Name="TextBlockSoftCopyright" Grid.Column="3" Style="{StaticResource Caption}">本软件著作权归某某所有</TextBlock>
        </Grid>
    </Grid>
</Window>
