From fd9a8668c5c8dd0f52b47ae1b0941dc075131893 Mon Sep 17 00:00:00 2001 From: rabbitism Date: Tue, 25 Jun 2024 21:49:23 +0800 Subject: [PATCH] feat: WIP. --- demo/Ursa.Demo/Views/MainWindow.axaml | 5 +- .../Controls/UrsaWindow.axaml | 8 +++ src/Ursa/Windows/UrsaWindow.cs | 50 +++++++++++++++++++ 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml create mode 100644 src/Ursa/Windows/UrsaWindow.cs diff --git a/demo/Ursa.Demo/Views/MainWindow.axaml b/demo/Ursa.Demo/Views/MainWindow.axaml index 054e043..86de1ef 100644 --- a/demo/Ursa.Demo/Views/MainWindow.axaml +++ b/demo/Ursa.Demo/Views/MainWindow.axaml @@ -1,10 +1,11 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml b/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml new file mode 100644 index 0000000..ae6cb6e --- /dev/null +++ b/src/Ursa.Themes.Semi/Controls/UrsaWindow.axaml @@ -0,0 +1,8 @@ + + + + + + diff --git a/src/Ursa/Windows/UrsaWindow.cs b/src/Ursa/Windows/UrsaWindow.cs new file mode 100644 index 0000000..d315151 --- /dev/null +++ b/src/Ursa/Windows/UrsaWindow.cs @@ -0,0 +1,50 @@ +using Avalonia; +using Avalonia.Controls; +using Avalonia.Platform; + +namespace Ursa.Controls; + +/// +/// Ursa Window is an advanced Window control that provides a lot of features and customization options. +/// +public class UrsaWindow: Window +{ + public static readonly StyledProperty ShowFullScreenButtonProperty = AvaloniaProperty.Register( + nameof(ShowFullScreenButton), false); + + public bool ShowFullScreenButton + { + get => GetValue(ShowFullScreenButtonProperty); + set => SetValue(ShowFullScreenButtonProperty, value); + } + + public static readonly StyledProperty ShowMaximumButtonProperty = AvaloniaProperty.Register( + nameof(ShowMaximumButton)); + + public bool ShowMaximumButton + { + get => GetValue(ShowMaximumButtonProperty); + set => SetValue(ShowMaximumButtonProperty, value); + } + + public static readonly StyledProperty ShowMinimumButtonProperty = AvaloniaProperty.Register( + nameof(ShowMinimumButton)); + + public bool ShowMinimumButton + { + get => GetValue(ShowMinimumButtonProperty); + set => SetValue(ShowMinimumButtonProperty, value); + } + + public static readonly StyledProperty ShowCloseButtonProperty = AvaloniaProperty.Register( + nameof(ShowCloseButton)); + + public bool ShowCloseButton + { + get => GetValue(ShowCloseButtonProperty); + set => SetValue(ShowCloseButtonProperty, value); + } + + + +} \ No newline at end of file