Skip to content

Commit

Permalink
chore: fix When_<Move|Resize>_Before_Activate
Browse files Browse the repository at this point in the history
  • Loading branch information
ramezgerges committed Nov 4, 2024
1 parent 700a60c commit df0796c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Uno.UI.Runtime.Skia.Wpf/UI/Controls/WpfWindowWrapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,12 @@ public WpfWindowWrapper(UnoWpfWindow wpfWindow, WinUIWindow window, XamlRoot xam
_wpfWindow.DpiChanged += OnNativeDpiChanged;
_wpfWindow.StateChanged += OnNativeStateChanged;
_wpfWindow.Host.SizeChanged += (_, e) => OnHostSizeChanged(e.NewSize);
OnHostSizeChanged(new Size(_wpfWindow.Width, _wpfWindow.Height));
_wpfWindow.LocationChanged += OnNativeLocationChanged;
_wpfWindow.SizeChanged += OnNativeSizeChanged;

RasterizationScale = (float)VisualTreeHelper.GetDpi(_wpfWindow.Host).DpiScaleX;

OnHostSizeChanged(new Size(_wpfWindow.Width, _wpfWindow.Height));
UpdateSizeFromNative();
UpdatePositionFromNative();
}
Expand Down Expand Up @@ -72,7 +75,6 @@ public override string Title

protected override void ShowCore()
{
RasterizationScale = (float)VisualTreeHelper.GetDpi(_wpfWindow.Host).DpiScaleX;
_wpfWindow.Show();
_wasShown = true;
UpdatePositionFromNative();
Expand Down

0 comments on commit df0796c

Please sign in to comment.