<Window x:Class="SubCabinetSolution.MainWindow" 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:utils="clr-namespace:SubCabinetSolution.Utils" Title="高值耗材柜(科室)" MinWidth="600" MinHeight="500" Background="#4381DF" ResizeMode="NoResize" WindowStartupLocation="CenterScreen" WindowState="Maximized" WindowStyle="None" mc:Ignorable="d"> <Window.Resources> <Style x:Key="UserDefineButtonStyle" TargetType="Button"> <Setter Property="Width" Value="200" /> <Setter Property="Height" Value="30" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="Button"> <Border Name="ButtonBorder" Background="#4381DF" BorderBrush="White" BorderThickness="0" CornerRadius="5" TextBlock.Foreground="White"> <ContentPresenter Margin="{TemplateBinding Padding}" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Border> <ControlTemplate.Triggers> <Trigger Property="IsMouseOver" Value="True"> <Setter TargetName="ButtonBorder" Property="Background" Value="#CC4381DF" /> </Trigger> <Trigger Property="IsPressed" Value="True"> <Setter TargetName="ButtonBorder" Property="Opacity" Value="0.6" /> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <Style x:Key="UserDefineTextBlockStyle" TargetType="TextBlock"> <Setter Property="FontSize" Value="12" /> <Setter Property="FontFamily" Value="微软雅黑" /> <Setter Property="Foreground" Value="White" /> <Setter Property="HorizontalAlignment" Value="Center" /> </Style> </Window.Resources> <Grid> <Grid.RowDefinitions> <RowDefinition Height="40" /> <RowDefinition /> <RowDefinition Height="60" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" Grid.ColumnSpan="2" Padding="30,20" FontFamily="宋体" FontSize="18" FontWeight="Bold" Foreground="White" Text="航天203所" /> <Border Grid.Row="1" Width="300" Height="350" Background="White" CornerRadius="10"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="1.5*" /> <RowDefinition Height="*" /> <RowDefinition Height="*" /> <RowDefinition Height="*" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <TextBlock Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" FontFamily="微软雅黑" FontSize="18" Foreground="#4381DF" Text="RFID智能耗材柜" /> <StackPanel Grid.Row="1" Width="200" Orientation="Vertical"> <TextBlock Width="200" FontFamily="微软雅黑" FontSize="12" Foreground="#C4C4C4" Text="用户名" /> <TextBox Height="30" VerticalContentAlignment="Center" BorderThickness="0,0,0,1" Text="{Binding UserName}" /> </StackPanel> <StackPanel Grid.Row="2" Width="200" Orientation="Vertical"> <TextBlock FontFamily="微软雅黑" FontSize="12" Foreground="#C4C4C4" Text="密码" /> <PasswordBox Height="30" VerticalContentAlignment="Center" utils:PasswordBindingHelper.Password="{Binding UserPassword, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" BorderThickness="0,0,0,1" /> </StackPanel> <Button Grid.Row="3" Command="{Binding LoginToMainCommand}" CommandParameter="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" Content="登录" Style="{StaticResource UserDefineButtonStyle}" /> <Button Grid.Row="4" Width="200" Height="30" VerticalAlignment="Top" Background="White" BorderThickness="0" FontWeight="Bold" Foreground="#4381DF"> <StackPanel Orientation="Horizontal"> <Image Source="/Images/人脸识别.png" /> <TextBlock Margin="5,0" VerticalAlignment="Center" Text="刷脸登录" /> </StackPanel> </Button> </Grid> </Border> <StackPanel Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" Orientation="Vertical"> <TextBlock Style="{StaticResource UserDefineTextBlockStyle}" Text="版权所有 © 中国航天科工第二研究院203所" /> <TextBlock Margin="0,3" Style="{StaticResource UserDefineTextBlockStyle}" Text="xxxxx管理有限公司 运营" /> <TextBlock Margin="0,0,0,10" Style="{StaticResource UserDefineTextBlockStyle}" Text="{Binding VersionName}" /> </StackPanel> </Grid> </Window>