As soon as the DialogResult property is set to a value, the window closes. When closing a window that was opened with the ShowDialog method, set the DialogResult property to either true or false to indicate an 'accepted' or 'canceled' state, respectively. Once a window is closed, the same object instance can't be used to reopen the window.įor more information about the life of a window, see Overview of WPF windows: Window lifetime.