From 423339b185738ade0352fdcfd8bdd1e942d54d52 Mon Sep 17 00:00:00 2001 From: Melissa Geels Date: Thu, 30 Jan 2025 09:13:30 +0100 Subject: [PATCH] Use `Bounds` instead of `Width` and `Height` properties as they are "requested" size rather than actual size (see #18060) --- samples/IntegrationTestApp/ShowWindowTest.axaml.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/IntegrationTestApp/ShowWindowTest.axaml.cs b/samples/IntegrationTestApp/ShowWindowTest.axaml.cs index bc4a43b7e6a..6dfc3825a09 100644 --- a/samples/IntegrationTestApp/ShowWindowTest.axaml.cs +++ b/samples/IntegrationTestApp/ShowWindowTest.axaml.cs @@ -72,7 +72,7 @@ private void TimerOnTick(object? sender, EventArgs e) _orderTextBox!.Text = MacOSIntegration.GetOrderedIndex(this).ToString(); } - private void AddToWidth_Click(object? sender, RoutedEventArgs e) => Width += 10; - private void AddToHeight_Click(object? sender, RoutedEventArgs e) => Height += 10; + private void AddToWidth_Click(object? sender, RoutedEventArgs e) => Width = Bounds.Width + 10; + private void AddToHeight_Click(object? sender, RoutedEventArgs e) => Height = Bounds.Height + 10; } }