From 9845dfadefa10bbe55a1fb80946dcecd256b56e5 Mon Sep 17 00:00:00 2001 From: Steven Kirk Date: Mon, 13 Mar 2023 21:30:51 +0100 Subject: [PATCH 01/11] Add system decorations and extend client area opts --- samples/IntegrationTestApp/MainWindow.axaml | 6 +++++ .../IntegrationTestApp/MainWindow.axaml.cs | 4 ++++ .../IntegrationTestApp/ShowWindowTest.axaml | 24 ++++++++++++++----- 3 files changed, 28 insertions(+), 6 deletions(-) diff --git a/samples/IntegrationTestApp/MainWindow.axaml b/samples/IntegrationTestApp/MainWindow.axaml index d4a96c5f175..bd840c03a7e 100644 --- a/samples/IntegrationTestApp/MainWindow.axaml +++ b/samples/IntegrationTestApp/MainWindow.axaml @@ -151,6 +151,12 @@ Maximized FullScreen + + None + BorderOnly + Full + + ExtendClientAreaToDecorationsHint Can Resize diff --git a/samples/IntegrationTestApp/MainWindow.axaml.cs b/samples/IntegrationTestApp/MainWindow.axaml.cs index 19eb1d64b0f..e9b86b3bdd3 100644 --- a/samples/IntegrationTestApp/MainWindow.axaml.cs +++ b/samples/IntegrationTestApp/MainWindow.axaml.cs @@ -68,6 +68,8 @@ private void ShowWindow() var locationComboBox = this.GetControl("ShowWindowLocation"); var stateComboBox = this.GetControl("ShowWindowState"); var size = !string.IsNullOrWhiteSpace(sizeTextBox.Text) ? Size.Parse(sizeTextBox.Text) : (Size?)null; + var systemDecorations = this.GetControl("ShowWindowSystemDecorations"); + var extendClientArea = this.GetControl("ShowWindowExtendClientAreaToDecorationsHint"); var canResizeCheckBox = this.GetControl("ShowWindowCanResize"); var owner = (Window)this.GetVisualRoot()!; @@ -95,6 +97,8 @@ private void ShowWindow() } sizeTextBox.Text = string.Empty; + window.ExtendClientAreaToDecorationsHint = extendClientArea.IsChecked ?? false; + window.SystemDecorations = (SystemDecorations)systemDecorations.SelectedIndex; window.WindowState = (WindowState)stateComboBox.SelectedIndex; switch (modeComboBox.SelectedIndex) diff --git a/samples/IntegrationTestApp/ShowWindowTest.axaml b/samples/IntegrationTestApp/ShowWindowTest.axaml index bd6910dd4de..720ff6c344d 100644 --- a/samples/IntegrationTestApp/ShowWindowTest.axaml +++ b/samples/IntegrationTestApp/ShowWindowTest.axaml @@ -6,7 +6,7 @@ x:DataType="Window" Title="Show Window Test"> - + @@ -35,13 +35,25 @@ FullScreen - - + + + None + BorderOnly + Full + + + + ExtendClientAreaToDecorationsHint + + + + -