Created
June 3, 2022 14:09
-
-
Save emoacht/41f5885e6f995d682cfdc27ed222e85b to your computer and use it in GitHub Desktop.
Set owner window after .NET 5.0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// using WinRT.Interop; | |
public void SetOwnerWindow(StoreContext context, Window window) | |
{ | |
var handle = new WindowInteropHelper(window).Handle; | |
InitializeWithWindow.Initialize(context, handle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment