Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(GH-84) Introduce new ClosedBy property with a close reason enumeration #100

Merged
merged 1 commit into from
Sep 13, 2019

Conversation

punker76
Copy link
Owner

@punker76 punker76 commented Sep 13, 2019

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.");
}

Closes #84
Closes #91

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.
@punker76 punker76 added this to the 2.0.0 milestone Sep 13, 2019
@punker76 punker76 merged commit 6262343 into dev Sep 13, 2019
@punker76 punker76 deleted the features/GH-84-CloseReason branch September 13, 2019 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Passing ChildWindowResult back on close button pressed CloseEvent
1 participant