ui编辑
This commit is contained in:
parent
cc0f92c518
commit
427ba1ee5d
@ -1,9 +1,18 @@
|
||||
<Application x:Class="chatclient.App"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
|
||||
xmlns:local="clr-namespace:chatclient"
|
||||
StartupUri="MainWindow.xaml">
|
||||
<Application.Resources>
|
||||
|
||||
<ResourceDictionary>
|
||||
<ResourceDictionary.MergedDictionaries>
|
||||
<materialDesign:BundledTheme BaseTheme="Light" PrimaryColor="DeepPurple" SecondaryColor="Lime" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign3.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesign2.Defaults.xaml" />
|
||||
<ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
|
||||
</ResourceDictionary.MergedDictionaries>
|
||||
</ResourceDictionary>
|
||||
</Application.Resources>
|
||||
</Application>
|
||||
|
37
chatclient/LoginWindow.xaml
Normal file
37
chatclient/LoginWindow.xaml
Normal file
@ -0,0 +1,37 @@
|
||||
<Window x:Class="chatclient.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"
|
||||
xmlns:local="clr-namespace:chatclient"
|
||||
mc:Ignorable="d"
|
||||
Title="LoginWindow" Height="600" Width="360">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="6*"/>
|
||||
<RowDefinition Height="2*"/>
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<Grid Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="20">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="2*"/>
|
||||
<RowDefinition Height="6*"/>
|
||||
</Grid.RowDefinitions>
|
||||
<TextBlock Grid.Row="0" Style="{StaticResource MaterialDesignHeadline3TextBlock}" Text="登录" HorizontalAlignment="Center"/>
|
||||
<Grid Grid.Row="1" Margin="10" Width="280">
|
||||
<StackPanel>
|
||||
<CheckBox Visibility="Hidden"/>
|
||||
<TextBox VerticalAlignment="Top" materialDesign:HintAssist.Hint="Text (validated)" Style="{StaticResource MaterialDesignOutlinedTextBox}"/>
|
||||
<CheckBox Visibility="Hidden"/>
|
||||
<PasswordBox VerticalContentAlignment="Bottom" materialDesign:HintAssist.Hint="Password"
|
||||
materialDesign:TextFieldAssist.HasClearButton="False"
|
||||
IsEnabled="{Binding ElementName=RevealPasswordOutlinedEnabled, Path=IsChecked}"
|
||||
Style="{StaticResource MaterialDesignOutlinedRevealPasswordBox}"/>
|
||||
<CheckBox x:Name="jiji" Content="记住我" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</Window>
|
28
chatclient/LoginWindow.xaml.cs
Normal file
28
chatclient/LoginWindow.xaml.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace chatclient
|
||||
{
|
||||
/// <summary>
|
||||
/// LoginWindow.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class LoginWindow : Window
|
||||
{
|
||||
public LoginWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -3,14 +3,38 @@
|
||||
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"
|
||||
xmlns:local="clr-namespace:chatclient"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="450" Width="800">
|
||||
Title="ChatWindow" Height="450" Width="800"
|
||||
Style="{StaticResource MaterialDesignWindow}">
|
||||
<Grid>
|
||||
<Grid.ColumnDefinitions>
|
||||
<ColumnDefinition Width="50"/>
|
||||
<ColumnDefinition Width="1.5*"/>
|
||||
<ColumnDefinition Width="4.5*"/>
|
||||
</Grid.ColumnDefinitions>
|
||||
<materialDesign:Card
|
||||
>
|
||||
<TabControl VerticalContentAlignment="Bottom" materialDesign:ColorZoneAssist.Mode="PrimaryMid" Style="{StaticResource MaterialDesignNavigationRailTabControl}">
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Width="auto" Height="auto">
|
||||
<materialDesign:PackIcon Width="24" Height="24" HorizontalAlignment="Center" Kind="Cog" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="All Files" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<StackPanel>
|
||||
<TextBlock Text="123"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem>
|
||||
<TabItem.Header>
|
||||
<StackPanel Width="auto" Height="auto">
|
||||
<materialDesign:PackIcon Width="24" Height="24" HorizontalAlignment="Center" Kind="Cog" />
|
||||
<TextBlock HorizontalAlignment="Center" Text="设置" />
|
||||
</StackPanel>
|
||||
</TabItem.Header>
|
||||
<StackPanel>
|
||||
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</materialDesign:Card>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
@ -20,5 +20,10 @@ namespace chatclient
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void PackIcon_DpiChanged()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@ -8,4 +8,10 @@
|
||||
<UseWPF>true</UseWPF>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MaterialDesignThemes" Version="5.2.1" />
|
||||
<PackageReference Include="MaterialDesignThemes.MahApps" Version="5.2.1" />
|
||||
<PackageReference Include="MaterialDesignThemes.Wpf" Version="1.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
BIN
chatclient/user.png
Normal file
BIN
chatclient/user.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.8 KiB |
Loading…
x
Reference in New Issue
Block a user