Files
Andy De George da363692ff Initial WPF content migrated (#17)
* Reset branch for WPF changes

* Convert BMP to PNG; fix link-out-of-scope err

* Add snippets for WPF... 6794 files!!!!

* Add missing snippets

* update file updated between migration

* Fix paths to include

* update breadcrumb and toc

* fix index links

* fix index links

* fix index links

* fix markdown
2020-09-04 09:46:28 -07:00

1.3 KiB

title, ms.date, dev_langs, helpviewer_keywords, ms.assetid
title ms.date dev_langs helpviewer_keywords ms.assetid
How to: Open a Dialog Box 03/30/2017
csharp
vb
opening dialog boxes [WPF]
dialog boxes [WPF], opening
6b1557d2-da98-4ef4-9f68-4089f04ab9ea

How to: Open a Dialog Box

This example shows how to open a dialog box.

Example

A dialog box is a window that is opened by instantiating xref:System.Windows.Window and calling the xref:System.Windows.Window.ShowDialog%2A method. xref:System.Windows.Window.ShowDialog%2A opens a window and doesn't return until the new dialog box has been closed. This type of window is also known as a modal window, and restricts user input.

[!code-csharpHOWTOWindowManagementSnippets#OpenNewDialogBoxCODE] [!code-vbHOWTOWindowManagementSnippets#OpenNewDialogBoxCODE]

.NET Framework Security

Calling xref:System.Windows.Window.ShowDialog%2A requires permission to use all windows and user input events without restriction.

See also