How to: Open a Window

This example shows how to open a window.

A window is opened by instantiating Window and calling the Show method. Show opens a window and returns immediately without waiting for the new window to close. This type of window is also known as a modeless window, and doesn't restrict user input.

CustomWindow window = new CustomWindow();
window.Show(); // Returns immediately

Instantiating Window requires permission to call unsafe native methods (see Window).

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft