diff --git a/SukiUI/Controls/SukiWindow.axaml b/SukiUI/Controls/SukiWindow.axaml index 9ae12882..9af6c9d5 100644 --- a/SukiUI/Controls/SukiWindow.axaml +++ b/SukiUI/Controls/SukiWindow.axaml @@ -64,7 +64,7 @@ + IsVisible="{TemplateBinding CanMaxSize}"> SetValue(CanMinimizeProperty, value); } + public static readonly StyledProperty CanMaxSizeProperty = + AvaloniaProperty.Register(nameof(CanMaxSize), defaultValue: true); + + public bool CanMaxSize + { + get => GetValue(CanMaxSizeProperty); + set => SetValue(CanMaxSizeProperty, value); + } + public static readonly StyledProperty CanMoveProperty = AvaloniaProperty.Register(nameof(CanMove), defaultValue: true); diff --git a/UotanToolbox/App.axaml.cs b/UotanToolbox/App.axaml.cs index 1834102d..0d74ac79 100644 --- a/UotanToolbox/App.axaml.cs +++ b/UotanToolbox/App.axaml.cs @@ -32,6 +32,7 @@ public override void OnFrameworkInitializationCompleted() desktop.MainWindow = viewLocator?.Build(mainVm) as Window; desktop.MainWindow.MinWidth = 1220; desktop.MainWindow.MaxWidth = 1220; + desktop.MainWindow.MaxHeight = 840; desktop.MainWindow.Height = 840; } diff --git a/UotanToolbox/MainView.axaml b/UotanToolbox/MainView.axaml index 676dd0ef..5d0b2ecb 100644 --- a/UotanToolbox/MainView.axaml +++ b/UotanToolbox/MainView.axaml @@ -17,6 +17,7 @@ BackgroundStyle="{Binding BackgroundStyle}" BackgroundTransitionsEnabled="{Binding TransitionsEnabled}" Icon="Assets/OIG.N5o-removebg-preview.png" + CanMaxSize="False" IsMenuVisible="False" mc:Ignorable="d">