更新UI界面

This commit is contained in:
ZouJin 2022-12-20 18:08:30 +08:00
parent b4d962e58d
commit 94b46832c7
3 changed files with 51 additions and 9 deletions

View File

@ -5,7 +5,15 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:VPet_Simulator.Core" mc:Ignorable="d" Height="500"
Width="500">
<Grid>
</Grid>
<UserControl.Resources>
<ResourceDictionary Source="Theme.xaml" />
</UserControl.Resources>
<Border Background="{DynamicResource Primary}" BorderBrush="{DynamicResource DARKPrimaryDark}" BorderThickness="5"
VerticalAlignment="Bottom" Padding="10" Margin="5" CornerRadius="5">
<StackPanel>
<Label Content="虚拟桌宠名字:" Foreground="{DynamicResource PrimaryText}" HorizontalAlignment="Left" Padding="0"
FontWeight="Bold" Margin="0,0,0,6" FontSize="22" />
<TextBlock Text="我说话长这样,这是我说的话巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉巴拉" TextWrapping="WrapWithOverflow" FontSize="16" />
</StackPanel>
</Border>
</UserControl>

View File

@ -3,11 +3,46 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:local="clr-namespace:VPet_Simulator.Core"
mc:Ignorable="d" xmlns:pu="clr-namespace:Panuon.WPF.UI;assembly=Panuon.WPF.UI"
MouseEnter="UserControl_MouseEnter" MouseLeave="UserControl_MouseLeave">
MouseEnter="UserControl_MouseEnter" MouseLeave="UserControl_MouseLeave" Height="500" Width="500">
<UserControl.Resources>
<ResourceDictionary Source="Theme.xaml" />
</UserControl.Resources>
<Grid>
<pu:ContentControlX BorderBrush="{DynamicResource DARKPrimaryDarker}" Background="{DynamicResource Secondary}"
BorderThickness="2" CornerRadius="5" Height="200" Width="300" VerticalAlignment="Bottom"
HorizontalAlignment="Left" Margin="0,0,0,50">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="1*" />
<RowDefinition Height="10" />
<RowDefinition Height="1*" />
<RowDefinition Height="10" />
<RowDefinition Height="1*" />
<RowDefinition Height="10" />
<RowDefinition Height="1*" />
<RowDefinition Height="10" />
<RowDefinition Height="1*" />
</Grid.RowDefinitions>
<Button Background="Transparent" Content="投喂" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}" />
<Button Background="Transparent" Content="面板" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Row="4" Margin="0,-1,0,0" />
<Button Background="Transparent" Content="打工" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Row="2" Margin="0,-1,0,0" />
<Button Background="Transparent" Content="睡觉" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Row="6" Margin="0,-1,0,0" />
<Button Background="Transparent" Content="设置" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Row="8" Margin="0,-4,0,0" />
<Rectangle Grid.Row="1" Fill="{DynamicResource SecondaryDarker}" Height="2" VerticalAlignment="Center" />
<Rectangle Grid.Row="3" Fill="{DynamicResource SecondaryDarker}" Height="2" VerticalAlignment="Center" />
<Rectangle Grid.Row="5" Fill="{DynamicResource SecondaryDarker}" Height="2" VerticalAlignment="Center" />
<Rectangle Grid.Row="7" Fill="{DynamicResource SecondaryDarker}" Height="2" VerticalAlignment="Center" />
</Grid>
</pu:ContentControlX>
<pu:ContentControlX BorderBrush="{DynamicResource DARKPrimaryDarker}"
Background="{DynamicResource SecondaryLight}" BorderThickness="2" CornerRadius="5" Height="50"
Width="500" VerticalAlignment="Bottom">
@ -24,14 +59,13 @@
<ColumnDefinition Width="1*" />
</Grid.ColumnDefinitions>
<Button Background="Transparent" Content="投喂" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
/>
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}" />
<Button Background="Transparent" Content="面板" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Column="4" />
Grid.Column="4" />
<Button Background="Transparent" Content="打工" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Column="2" />
Grid.Column="2" />
<Button Background="Transparent" Content="睡觉" FontSize="24" Foreground="{DynamicResource PrimaryText}"
BorderBrush="Transparent" pu:ButtonHelper.HoverBackground="{DynamicResource Secondary}"
Grid.Column="6" />

View File

@ -1,7 +1,7 @@
<Window x:Class="VPet_Simulator.Windows.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" ResizeMode="NoResize"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" ShowInTaskbar="False"
xmlns:local="clr-namespace:VPet_Simulator.Windows" mc:Ignorable="d" WindowStyle="None" Title="MainWindow"
Height="250" Width="250" Background="{x:Null}" Topmost="True">
<WindowChrome.WindowChrome>