Search code examples
c#.netwpfwinformschildwindow

WPF equivalent of Form.ShowDialog(IWin32Window)


In WPF we have Window.ShowDialog() which allows showing a modal dialog box.

In WinForms there is similar functionality but it also has an overload Form.ShowDialog(IWin32Window) which allows an IWin32Window owner to be passed in. That way the new dialog is not modal, and always maintains a z-order directly above its owner.

How would I get this same functionality using WPF?


Solution

  • Use the Owner property on a Window.