From c3b4d240d10993725f8215b5e84e4b09e6c9b236 Mon Sep 17 00:00:00 2001 From: Yoojun Zhou Date: Sun, 25 Aug 2024 12:09:50 +0800 Subject: [PATCH] Correct RatingControl foreground contrast (#85) --- samples/ExamplePhotoTaker/App.xaml | 3 +- .../ExamplePhotoTaker.csproj | 19 +++------ samples/ExamplePhotoTaker/MainWindow.xaml | 40 ++++++++++++------- samples/ExamplePhotoTaker/MainWindow.xaml.cs | 30 +------------- samples/ExamplePhotoTaker/Pages/Page1.xaml | 19 --------- samples/ExamplePhotoTaker/Pages/Page1.xaml.cs | 16 -------- samples/ExamplePhotoTaker/Pages/Page2.xaml | 18 --------- samples/ExamplePhotoTaker/Pages/Page2.xaml.cs | 16 -------- .../Themes/Schemes/Dark.xaml | 2 +- .../Themes/Schemes/Light.xaml | 2 +- 10 files changed, 35 insertions(+), 130 deletions(-) delete mode 100644 samples/ExamplePhotoTaker/Pages/Page1.xaml delete mode 100644 samples/ExamplePhotoTaker/Pages/Page1.xaml.cs delete mode 100644 samples/ExamplePhotoTaker/Pages/Page2.xaml delete mode 100644 samples/ExamplePhotoTaker/Pages/Page2.xaml.cs diff --git a/samples/ExamplePhotoTaker/App.xaml b/samples/ExamplePhotoTaker/App.xaml index 228dc49..69b84c6 100644 --- a/samples/ExamplePhotoTaker/App.xaml +++ b/samples/ExamplePhotoTaker/App.xaml @@ -7,10 +7,9 @@ - + - diff --git a/samples/ExamplePhotoTaker/ExamplePhotoTaker.csproj b/samples/ExamplePhotoTaker/ExamplePhotoTaker.csproj index 273ea2b..5e8ecf8 100644 --- a/samples/ExamplePhotoTaker/ExamplePhotoTaker.csproj +++ b/samples/ExamplePhotoTaker/ExamplePhotoTaker.csproj @@ -4,34 +4,27 @@ WinExe net6.0-windows enable - enable + disable true false + - - + - - - - - - Code - + + - - Designer - + diff --git a/samples/ExamplePhotoTaker/MainWindow.xaml b/samples/ExamplePhotoTaker/MainWindow.xaml index 36b4625..865e87f 100644 --- a/samples/ExamplePhotoTaker/MainWindow.xaml +++ b/samples/ExamplePhotoTaker/MainWindow.xaml @@ -3,7 +3,9 @@ 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:ExamplePhotoTaker" xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" + xmlns:local="clr-namespace:ExamplePhotoTaker" + xmlns:ui="http://schemas.inkore.net/lib/ui/wpf/modern" + xmlns:ikw="http://schemas.inkore.net/lib/ui/wpf" mc:Ignorable="d" ui:WindowHelper.UseModernWindowStyle="True" Title="MainWindow" Height="450" Width="800" Language="en-US"> @@ -18,20 +20,28 @@ - - - - - - - - + + diff --git a/samples/ExamplePhotoTaker/MainWindow.xaml.cs b/samples/ExamplePhotoTaker/MainWindow.xaml.cs index 192c5f8..46ae575 100644 --- a/samples/ExamplePhotoTaker/MainWindow.xaml.cs +++ b/samples/ExamplePhotoTaker/MainWindow.xaml.cs @@ -1,5 +1,4 @@ -using ExamplePhotoTaker.Pages; -using iNKORE.UI.WPF.Modern.Media.Animation; +using iNKORE.UI.WPF.Modern.Media.Animation; using Microsoft.Win32; using System.Collections.ObjectModel; using System.Diagnostics; @@ -63,33 +62,6 @@ private void Button_SaveScreenshot_Click(object sender, RoutedEventArgs e) } } - Page1 Page_1 = new Page1(); - Page2 Page_2 = new Page2(); - - private void Button_NavigateToPage1_Click(object sender, RoutedEventArgs e) - { - NavigateTo(Page_1); - } - - private void Button_NavigateToPage2_Click(object sender, RoutedEventArgs e) - { - NavigateTo(Page_2); - } - - WeakReference __Frame_Main_NavigatingTarget = new WeakReference(null); - private void Frame_Main_Navigating(object sender, NavigatingCancelEventArgs e) - { - if (e.Content != __Frame_Main_NavigatingTarget.Target) - { - e.Cancel = true; - } - } - - public void NavigateTo(object content, object? extraData = null, NavigationTransitionInfo? infoOverride = null) - { - __Frame_Main_NavigatingTarget.Target = content; - Frame_Main.Navigate(content, extraData, infoOverride); - } } class VacationSpots : ObservableCollection diff --git a/samples/ExamplePhotoTaker/Pages/Page1.xaml b/samples/ExamplePhotoTaker/Pages/Page1.xaml deleted file mode 100644 index 47ad5df..0000000 --- a/samples/ExamplePhotoTaker/Pages/Page1.xaml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - -