Last active
June 3, 2022 14:17
-
-
Save emoacht/518e9d91c28aa24d672c0c74ed1ab0fd 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; | |
public void SetOwnerWindow(StoreContext context, Window window) | |
{ | |
var handle = new WindowInteropHelper(window).Handle; | |
var initWindow = context.As<IInitializeWithWindow>(); | |
initWindow.Initialize(handle); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment