public static Task <IUICommand> ShowDialogAsync(string content, string title = null) { var dialog = new MessageDialog(content, title ?? string.Empty); var handle = NativeMethods.GetActiveWindow(); if (handle == IntPtr.Zero) { throw new InvalidOperationException(); } InitializeWithWindow.Initialize(dialog, handle); return(dialog.ShowAsync().AsTask <IUICommand>()); }
private static void SetOwnerWindow(StoreContext context, Window window) { var handle = new WindowInteropHelper(window).Handle; InitializeWithWindow.Initialize(context, handle); }