From 944cf2c34b9a4a2a9624a2cee62cff9957442ac6 Mon Sep 17 00:00:00 2001 From: Hakoyu Date: Mon, 25 Dec 2023 00:31:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=20`InteractiveSetti?= =?UTF-8?q?ngsPage`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VPet.Solution/Converters.xaml | 1 + VPet.Solution/Converters/BoolInverter.cs | 19 + VPet.Solution/Styles.xaml | 23 +- VPet.Solution/VPet.Solution.csproj | 1 + .../Views/InteractiveSettingsPage.xaml | 726 ++++++++---------- 5 files changed, 354 insertions(+), 416 deletions(-) create mode 100644 VPet.Solution/Converters/BoolInverter.cs diff --git a/VPet.Solution/Converters.xaml b/VPet.Solution/Converters.xaml index 4c4b9ec..45ff5da 100644 --- a/VPet.Solution/Converters.xaml +++ b/VPet.Solution/Converters.xaml @@ -12,4 +12,5 @@ + \ No newline at end of file diff --git a/VPet.Solution/Converters/BoolInverter.cs b/VPet.Solution/Converters/BoolInverter.cs new file mode 100644 index 0000000..d8a5e55 --- /dev/null +++ b/VPet.Solution/Converters/BoolInverter.cs @@ -0,0 +1,19 @@ +using System.Globalization; +using System.Windows.Data; + +namespace VPet.House.Converters; + +public class BoolInverter : IValueConverter +{ + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is not bool b) + return false; + return !b; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } +} diff --git a/VPet.Solution/Styles.xaml b/VPet.Solution/Styles.xaml index 7a4bea8..0b1c5b7 100644 --- a/VPet.Solution/Styles.xaml +++ b/VPet.Solution/Styles.xaml @@ -160,10 +160,10 @@ @@ -186,4 +186,23 @@ TargetType="ComboBox"> + + \ No newline at end of file diff --git a/VPet.Solution/VPet.Solution.csproj b/VPet.Solution/VPet.Solution.csproj index a5a925b..0524d43 100644 --- a/VPet.Solution/VPet.Solution.csproj +++ b/VPet.Solution/VPet.Solution.csproj @@ -71,6 +71,7 @@ MSBuild:Compile Designer + diff --git a/VPet.Solution/Views/InteractiveSettingsPage.xaml b/VPet.Solution/Views/InteractiveSettingsPage.xaml index 82a9762..fcb57ac 100644 --- a/VPet.Solution/Views/InteractiveSettingsPage.xaml +++ b/VPet.Solution/Views/InteractiveSettingsPage.xaml @@ -14,488 +14,386 @@ d:DesignHeight="450" d:DesignWidth="800" mc:Ignorable="d"> - - + - - - - - + Content="{ll:Str 桌宠设置}" + FontSize="16" + FontWeight="Bold" + Style="{DynamicResource Label_BaseStyle}" /> + - - - - - - - - - - - + + + + + + + +