Udostępnij za pośrednictwem


DialogWindow.ShowModal Method

Definition

Finds the parent/owner of the dialog from the Visual Studio shell and display the dialog Sets the shell in modal state while the dialog is shown, and centers correctly the dialog in the parent window.

Note: If the dialog is parented to a WPF window, ShowDialog() can also be used to display it, but before doing so one will have to initialize correctly the dialog Owner and WindowStartupLocation.

public:
 Nullable<bool> ShowModal();
public bool? ShowModal ();
member this.ShowModal : unit -> Nullable<bool>
Public Function ShowModal () As Nullable(Of Boolean)

Returns

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 <xref:System.Windows.Window.WindowStartupOwner%2A> and the WindowStartupLocation correctly.

Applies to