LoginView.xaml 3.17 KB
<Window
    x:Class="HHECS.RobotTool.View.AccountView.LoginView"
    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:hc="https://handyorg.github.io/handycontrol"
    xmlns:local="clr-namespace:HHECS.RobotTool.View.AccountView"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewmodel="clr-namespace:HHECS.RobotTool.ViewModel.AccountVM"
    Title="登录"
    Width="750"
    Height="360"
    d:DataContext="{d:DesignInstance Type=viewmodel:LoginVM}"
    AllowsTransparency="True"
    WindowStartupLocation="CenterScreen"
    WindowStyle="None"
    mc:Ignorable="d">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="300" />
        </Grid.ColumnDefinitions>
        <Image
            Grid.Column="0"
            HorizontalAlignment="Center"
            Source="/Resource/Image/login.jpg"
            Stretch="UniformToFill" />
        <StackPanel
            Grid.Column="1"
            HorizontalAlignment="Center"
            VerticalAlignment="Center">
            <TextBlock
                Margin="0,10,0,35"
                HorizontalAlignment="Center"
                FontSize="38"
                FontWeight="Bold"
                Foreground="#b71b2b"
                Text="HUAHENG" />
            <hc:UniformSpacingPanel Orientation="Vertical" Spacing="10">
                <hc:ElementGroup
                    Height="30"
                    Margin="0,1"
                    VerticalAlignment="Center"
                    Layout="Stack">
                    <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                        <TextBlock
                            Width="40"
                            VerticalAlignment="Center"
                            Text="账号" />
                    </Border>
                    <TextBox Width="150" Text="{Binding Account, UpdateSourceTrigger=PropertyChanged}" />
                </hc:ElementGroup>
                <hc:ElementGroup
                    Height="30"
                    VerticalAlignment="Center"
                    Layout="Stack">
                    <Border Padding="6,0" Style="{StaticResource BorderRegion}">
                        <TextBlock
                            Width="40"
                            VerticalAlignment="Center"
                            Text="密码" />
                    </Border>
                    <PasswordBox
                        x:Name="txt_pwd"
                        Width="150"
                        KeyDown="txt_pwd_KeyDown"
                        MaxLength="16" />
                </hc:ElementGroup>
                <Button
                    Command="{Binding CommintCommand}"
                    Content="登录"
                    Style="{StaticResource ButtonPrimary}" />
                <Button
                    Command="{Binding CancelCommand}"
                    Content="取消"
                    Style="{StaticResource ButtonDefault}" />
            </hc:UniformSpacingPanel>
        </StackPanel>
    </Grid>
</Window>