Showing a WPF Window
Although you can choose to instantiate and show a WPF window manually, MM .NET's WPF Window Manager provides several Show() and ShowDialog() method overloads that make it easier to see the full universe of possibilities. Before learning about these methods, you first need to understand some basic WPF windowing principles.
Although WPF doesn't support true MDI (multiple document interface) applications, you can simulate MDI features in WPF by calling specific methods of the MM .NET Window Manager.
First of all, the MM .NET Window Manager has a ShowInTaskbarDefault property that specifies if a window should be displayed in the Windows task bar (it's set to false by default). Although setting this property prevents the window from appearing in the task bar, you still see it as a separate application when you press ALT+TAB. However, this can be prevented by means of the Owner property.
Every WPF window has an Owner property. If you set this property to the main application window, then the window does not appear in the list of applications when you press ALT+TAB. In addition, when you close the main application window it automatically closes all of its owned windows.
Window Manager Show() Methods
All overloads of the MM .NET WPF Window Manager Show() method contains allow you to specify the window to be displayed. You can optionally specify the ownerWindow parameter, which if you are trying to simulate an MDI application, will be the main application window. You can call these methods by referencing the mmAppWPF.WindowManager object. Here is an example of code that launches a Customer window from a menu handler on the main application window (where "this" and "Me" refer to the main application window).
In C#:
mmAppWPF.WindowManager.Show(new CustomerWindow(), this);And in VB .NET:
mmAppWPF.WindowManager.Show(New CustomerWindow(), Me)Some overloads of the Show() method accept a showInTaskbar parameter that allows you to specify whether a particular window should be shown in the Windows task bar. If you don't pass this parameter, the MM .NET Window Manager uses its ShowInTaskbarDefault property instead.
Window Manager ShowDialog() MethodThere is only one version of the ShowDialog() method. It simply takes the window to be displayed as a parameter and displays it as a modal window. This method returns a nullable boolean value that is passed back from the standard .NET ShowDialog() method.
© (c) 2026 Oak Leaf Enterprises, Inc., 1996-2026 • Updated: 04/26/18
Comment or report problem with topic
