I create a XamDialogWindow in code, add its Content, and then add the dialog it to my LayoutRoot.Children. When the XamDialogWindow is closed, I use the WindowStateChanged event to remove the XamDialogWindow from my LayoutRoot.Children when the WindowState…