2025-08-24 13:49:55 +08:00
|
|
|
<Window
|
|
|
|
|
x:Class="Sample.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:local="clr-namespace:Sample"
|
|
|
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
|
|
|
Title="MainWindow"
|
|
|
|
|
Width="800"
|
|
|
|
|
Height="450"
|
|
|
|
|
mc:Ignorable="d">
|
2025-09-12 09:55:36 +08:00
|
|
|
|
2025-08-24 13:49:55 +08:00
|
|
|
<Grid Background="{DynamicResource AppBackgroundBrush}">
|
|
|
|
|
<StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">
|
|
|
|
|
<TextBlock
|
|
|
|
|
FontSize="24"
|
|
|
|
|
Foreground="{DynamicResource AppTextBrush}"
|
|
|
|
|
Text="背景和文字都会渐变" />
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
x:Name="SwitchThemeButton"
|
|
|
|
|
Margin="0,20,0,0"
|
|
|
|
|
Padding="15,8"
|
|
|
|
|
Click="SwitchThemeButton_Click"
|
|
|
|
|
Content="切换主题" />
|
|
|
|
|
</StackPanel>
|
|
|
|
|
</Grid>
|
|
|
|
|
</Window>
|