change - 登录界面修改
parent
acee33516f
commit
9b89759cc9
@ -1,9 +1,36 @@
|
||||
<Application x:Class="Sln.Wcs.UI.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:local="clr-namespace:Sln.Wcs.UI"
|
||||
StartupUri="MainWindow.xaml">
|
||||
xmlns:local="clr-namespace:Sln.Wcs.UI">
|
||||
<Application.Resources>
|
||||
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.LightBlue.xaml" />
|
||||
|
||||
<!--<ResourceDictionary Source="Templates\Languages\StringResource.en-US.xaml" />
|
||||
<ResourceDictionary Source="Templates\Languages\StringResource.zh-CN.xaml" />-->
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
<!--重写框架主体色-->
|
||||
<SolidColorBrush x:Key="PrimaryHueLightBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueLightForegroundBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueMidBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueMidForegroundBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueDarkBrush" Color="#3b76ee" />
|
||||
<SolidColorBrush x:Key="PrimaryHueDarkForegroundBrush" Color="#3b76ee" />
|
||||
|
||||
<!-- DataGrid列标题居中样式 -->
|
||||
<Style x:Key="DataGridColumnHeaderStyle" TargetType="DataGridColumnHeader">
|
||||
<Setter Property="HorizontalContentAlignment" Value="Center"/>
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
|
||||
<!-- DataGrid单元格居中样式 -->
|
||||
<Style x:Key="DataGridCellCenterStyle" TargetType="DataGridCell">
|
||||
<Setter Property="HorizontalAlignment" Value="Center"/>
|
||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||
</Style>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
</Application>
|
||||
@ -0,0 +1,58 @@
|
||||
<Window x:Class="Sln.Wcs.UI.Page.Login.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:local="clr-namespace:Sln.Wcs.UI.Page.Login"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
mc:Ignorable="d"
|
||||
Title="{Binding SystemTitle}" Height="600" Width="980">
|
||||
<Window.Background>
|
||||
<ImageBrush ImageSource="/Templates/image/login-background.jpg" />
|
||||
</Window.Background>
|
||||
<Grid>
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="10*"/>
|
||||
<ColumnDefinition Width="5*"/>
|
||||
<ColumnDefinition Width="2*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<StackPanel Grid.Column="0" Background="Transparent" Height="50" VerticalAlignment="Top" HorizontalAlignment="Center" Margin="50,50">
|
||||
<Label Content="{Binding SystemTitle}" Foreground="#007DFA" FontSize="25"/>
|
||||
</StackPanel>
|
||||
<Border Grid.Column="1" Background="White" Height="300" CornerRadius="10" >
|
||||
<Grid Cursor="">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
<RowDefinition/>
|
||||
</Grid.RowDefinitions>
|
||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<TextBlock Foreground="Gray" Text="用户登录" FontSize="20"/>
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<!--<TextBlock Foreground="Gray" Text="账号:" FontSize="16" Margin="0,10,10,0"/>
|
||||
<TextBox x:Name="UserNameStr" Foreground="Gray" FontSize="16" Width="150" Height="35"/>-->
|
||||
<materialDesign:PackIcon Kind="AccountKeyOutline" VerticalAlignment="Bottom" Height="25" Width="25" Margin="0,0,10,0"/>
|
||||
<TextBox x:Name="UserNameStr" Width="150" FontSize="16" VerticalAlignment="Center" materialDesign:HintAssist.Hint="请输入用户名" Style="{StaticResource MaterialDesignFloatingHintTextBox}" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||
<!--<TextBlock Foreground="Gray" Text="密码:" FontSize="16" Margin="0,10,10,0"/>-->
|
||||
<!--<PasswordBox x:Name="PasswordStr" HorizontalAlignment="Left" VerticalContentAlignment="Center" Width="150" PasswordChar="*" />-->
|
||||
<materialDesign:PackIcon Kind="AccountLockOutline" VerticalAlignment="Bottom" Height="25" Width="25" Margin="0,0,10,0"/>
|
||||
<PasswordBox
|
||||
x:Name="PasswordStr" Width="150" FontSize="16"
|
||||
materialDesign:HintAssist.Foreground="Green"
|
||||
materialDesign:HintAssist.Hint="请输入密码"
|
||||
materialDesign:TextFieldAssist.UnderlineBrush="Green"
|
||||
Style="{StaticResource MaterialDesignFloatingHintPasswordBox}" Cursor="Hand" />
|
||||
</StackPanel>
|
||||
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="3">
|
||||
<Button x:Name="LoginBtn" Content="登录" Background="#007DFA" ToolTip="MaterialDesignFlatMidButton" Margin="10,0,10,0" Style="{StaticResource MaterialDesignFlatMidBgButton}" Foreground="White" FontSize="16" Width="150" Height="30" Click="LoginBtn_Click"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
||||
Loading…
Reference in New Issue