The new property ClosedBy indicates now which close reason occured.
var childWindow = new CoolChildWindow() { IsModal = true, AllowMove = true, VerticalContentAlignment = VerticalAlignment.Bottom };
await this.ShowChildWindowAsync<CloseReason>(childWindow, RootGrid);
if (childWindow.ClosedBy == CloseReason.Cancel)
{
await this.ShowMessageAsync("ChildWindow Result", "The dialog was canceled.");
}
It's also possible to grab this directly as the result of the ShowMessageAsync method.
var childWindow = new CoolChildWindow() {IsModal = true, AllowMove = true, VerticalContentAlignment = VerticalAlignment.Bottom};
var result = await this.ShowChildWindowAsync<CloseReason>(childWindow, RootGrid);
if (result == CloseReason.Cancel)
{
await this.ShowMessageAsync("ChildWindow Result", "The dialog was canceled.");
}
The new property
ClosedBy
indicates now which close reason occured.It's also possible to grab this directly as the result of the ShowMessageAsync method.
Closes #84 Closes #91