internal Task <T> Show() { _dialogHost = _dialogHostLocator.GetPart().Start(_title, _content, _commands); var tcs = new TaskCompletionSource <T>(); _dialogHost.Completed += (sender, args) => { if (Cancelled) { tcs.SetCanceled(); } else { tcs.SetResult(DialogResult); } }; _windowManager.ShowDialog(_dialogHost); return(tcs.Task); }
public DialogClosingStrategy(DialogHostBase dialogHost) { _dialogHost = dialogHost; }