Partager via


DialogWindow.ShowModal Method

Gets the parent or owner of the dialog from the Visual Studio shell and displays the dialog window. It also puts the shell in a modal state while the dialog is displayed, and centers the dialog window correctly in the parent window.

Namespace:  Microsoft.VisualStudio.PlatformUI
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Déclaration
Public Function ShowModal As Nullable(Of Boolean)
'Utilisation
Dim instance As DialogWindow
Dim returnValue As Nullable(Of Boolean)

returnValue = instance.ShowModal()
public Nullable<bool> ShowModal()
public:
Nullable<bool> ShowModal()
member ShowModal : unit -> Nullable<bool> 
public function ShowModal() : Nullable<boolean>

Return Value

Type: System.Nullable<Boolean>
T:System.Nullable`1

Remarks

If the dialog is parented to a WPF window, you can also ShowDialog to display it, but before doing so you must initialize the WindowStartupOwner() and the WindowStartupLocation correctly.

.NET Framework Security

See Also

Reference

DialogWindow Class

DialogWindow Members

Microsoft.VisualStudio.PlatformUI Namespace