From 00345f5d34e7f6ad74eb173499280f4667aa43c6 Mon Sep 17 00:00:00 2001 From: Zhang Dian <54255897+zdpcdt@users.noreply.github.com> Date: Tue, 15 Apr 2025 22:26:53 +0800 Subject: [PATCH] misc: simplify OnPlatform use case. --- demo/Ursa.Demo/Views/MainWindow.axaml | 4 +-- .../Controls/UrsaWindow.axaml | 35 +++---------------- 2 files changed, 6 insertions(+), 33 deletions(-) diff --git a/demo/Ursa.Demo/Views/MainWindow.axaml b/demo/Ursa.Demo/Views/MainWindow.axaml index 6789bc6..d72ee64 100644 --- a/demo/Ursa.Demo/Views/MainWindow.axaml +++ b/demo/Ursa.Demo/Views/MainWindow.axaml @@ -15,8 +15,8 @@ x:DataType="viewModels:MainWindowViewModel" WindowStartupLocation="CenterScreen" Icon="/Assets/Ursa.ico" - IsFullScreenButtonVisible="{OnPlatform True, macOS=False}" - IsManagedResizerVisible="{OnPlatform False, Linux=True}" + IsFullScreenButtonVisible="{OnPlatform {x:True}, macOS={x:False}}" + IsManagedResizerVisible="{OnPlatform {x:False}, Linux={x:True}}" mc:Ignorable="d"> diff --git a/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml b/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml index 3ba0f96..2dab5b9 100644 --- a/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml +++ b/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml @@ -11,39 +11,12 @@ - - - - True - - - False - - - - - - - True - - - False - - - - - - - True - - - False - - - + + + - + Full