Skip to content

Commit

Permalink
Merge pull request #996 from thoemmi/issue-994
Browse files Browse the repository at this point in the history
fixing external dialogs (fixes #994)
  • Loading branch information
AzureKitsune committed Feb 3, 2014
2 parents 6a8e2cf + 4441904 commit a1d4b23
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions MahApps.Metro/Controls/Dialogs/DialogManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,15 @@ private static Window SetupExternalDialogWindow(BaseMetroDialog dialog)

win.Content = dialog;

EventHandler closedHandler = null;
closedHandler = (sender, args) =>
{
win.Closed -= closedHandler;
dialog.ParentDialogWindow = null;
win.Content = null;
};
win.Closed += closedHandler;

return win;
}
#endregion
Expand Down

0 comments on commit a1d4b23

Please sign in to comment.