Skip to content

Commit 423339b

Browse files
committed
Use Bounds instead of Width and Height properties as they are "requested" size rather than actual size (see #18060)
1 parent cadf6aa commit 423339b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

samples/IntegrationTestApp/ShowWindowTest.axaml.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ private void TimerOnTick(object? sender, EventArgs e)
7272
_orderTextBox!.Text = MacOSIntegration.GetOrderedIndex(this).ToString();
7373
}
7474

75-
private void AddToWidth_Click(object? sender, RoutedEventArgs e) => Width += 10;
76-
private void AddToHeight_Click(object? sender, RoutedEventArgs e) => Height += 10;
75+
private void AddToWidth_Click(object? sender, RoutedEventArgs e) => Width = Bounds.Width + 10;
76+
private void AddToHeight_Click(object? sender, RoutedEventArgs e) => Height = Bounds.Height + 10;
7777
}
7878
}

0 commit comments

Comments
 (0)