Browse Source

Use Window.Owner as owner in Show.

We probably want to change this and pass the owner to the `Show` method as we do for dialogs: having owner specified in different places for dialogs vs non-dialogs is not a good API.
pull/2250/head
Steven Kirk 7 years ago
parent
commit
abfe467784
  1. 4
      src/Avalonia.Controls/Window.cs

4
src/Avalonia.Controls/Window.cs

@ -388,7 +388,7 @@ namespace Avalonia.Controls
PlatformImpl?.Show();
Renderer?.Start();
}
SetWindowStartupLocation();
SetWindowStartupLocation(Owner?.PlatformImpl);
}
/// <summary>
@ -464,7 +464,7 @@ namespace Avalonia.Controls
return result.Task;
}
private void SetWindowStartupLocation(IWindowImpl owner = null)
private void SetWindowStartupLocation(IWindowBaseImpl owner = null)
{
var scaling = owner?.Scaling ?? PlatformImpl?.Scaling ?? 1;

Loading…
Cancel
Save