<Window x:Class="MWSDomain.View.Sign.Login"
        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:local="clr-namespace:MWSDomain.View.Sign"
        xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
        xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
        mc:Ignorable="d"
        Loaded="Window_Loaded"
        Title="Wpf_Smaple" Height="1080"  Width="1920" WindowStyle="None" Icon="/assets/Images/Logo.png" WindowStartupLocation="CenterScreen"  AllowsTransparency="True" ResizeMode="NoResize"  >
    <Window.Background>
        <ImageBrush ImageSource="/Assets/Images/login_bg.png" Stretch="Fill"/>
    </Window.Background>
    <StackPanel Orientation="Vertical" VerticalAlignment="Top" >
        <Canvas HorizontalAlignment="Right" Margin="0,0,60,0" Width="137">
            <Image Source="/Assets/Images/logout_bg.png"  />
            <Image Source="/Assets/Images/logout.png" Margin="58,11" >
                <i:Interaction.Triggers>
                    <i:EventTrigger EventName="MouseLeftButtonDown">
                        <i:InvokeCommandAction Command="{Binding ExitCommand, Mode=OneWay}"/>
                    </i:EventTrigger>
                </i:Interaction.Triggers>
            </Image>
        </Canvas>
        <!--<Image Source="/Assets/Images/login_logo.png" Height="66"  Margin="0,190,0,270"/>-->
        <StackPanel Margin="0,190,0,270" Orientation="Horizontal" HorizontalAlignment="Center">
            <Image Source="/Assets/Images/hdlogo.png" Height="60" />
            <TextBlock Margin="16,0,0,0" Text="垃圾吊监控称重系统" FontSize="30"
                           FontFamily="SourceHanSansCN-Bold" 
                           FontWeight="Bold" Foreground="#C8DBFF" VerticalAlignment="Center"/>
        </StackPanel>
       
        <StackPanel  Orientation="Vertical" Width="440">
            <Border  Background="#1B2A39"  Height="60" CornerRadius="10" Margin="20,20,20,11">
                <StackPanel Orientation="Horizontal">
                    <Image Source="/Assets/Images/account.png" Height="16" Margin="24,21,18,23"/>
                    
                    <Border Width="1" Background="#293947" Height="33"/>
                    <TextBox Width="330"  FontSize="14" Margin="5" Text="{Binding UserName}" Foreground="#596977" BorderBrush="Transparent" 
                             Background="Transparent" Style="{StaticResource MaterialDesignOutlinedTextBox}" materialDesign:HintAssist.IsFloating="False" materialDesign:HintAssist.Hint="请输入用户名">
                    </TextBox>
                </StackPanel>
            </Border>
            <Border Grid.Row="1" Background="#1B2A39"  Height="60" CornerRadius="10" Margin="20,11,20,17">
                <StackPanel Orientation="Horizontal">
                    <Image Source="/Assets/Images/lock.png" Height="16" Margin="24,21,18,23"/>
                    <Border Width="1" Background="#293947" Height="33"/>
                    <PasswordBox   Name="pass"  Width="330"  Foreground="#596977" Margin="5"  FontSize="14"
                         BorderBrush="Transparent"   HorizontalAlignment="Center" materialDesign:HintAssist.Hint="请输入密码" materialDesign:HintAssist.IsFloating="False"
                         Style="{StaticResource  MaterialDesignOutlinedPasswordBox}"    
                         local:PasswordBoxHelper.Password="{Binding Password,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
                        <i:Interaction.Behaviors>
                            <local:PasswordBoxBehavior />
                        </i:Interaction.Behaviors>
                    </PasswordBox>
                </StackPanel>
            </Border>
            <CheckBox x:Name="cbAutoLogin" Content="自动登录" IsChecked="{Binding UserChecked}" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,20,60" Foreground="#596977" />
            <Button  Content="登 录" IsEnabled="{Binding IsCancel}" BorderThickness="0"  materialDesign:ButtonAssist.CornerRadius="10" FontSize="18"
                     FontWeight="Bold"  VerticalAlignment="Center" HorizontalAlignment="Center" Height="60" Width="400"  Command="{Binding SignCommand}">
                <Button.Background >
                    <LinearGradientBrush>
                        <GradientStop Color="#0084CF" Offset="0.1"/>
                        <GradientStop Color="#1CAAFD" Offset="0.9"/>
                    </LinearGradientBrush>
                </Button.Background>
            </Button>
        </StackPanel>
        <Label  Content="{Binding Report}" HorizontalAlignment="Center" Foreground="White" FontSize="14" Margin="0,120,0,0"/>
    </StackPanel>
</Window>
