次の方法で共有


DialogWindow Class

Definition

Dialog class to be used as base class for Visual Studio WPF dialogs (non-Gel)

Someone implementing a WPF dialog should derive from this class (to have consistent styling with other VS dialogs, and help support) To display the dialog invoke the ShowModal() function, and that will take care of correctly parenting the dialog in the shell, enabling modal state for the shell while the dialog is displayed, etc.

public ref class DialogWindow : Microsoft::VisualStudio::PlatformUI::DialogWindowBase
public class DialogWindow : Microsoft.VisualStudio.PlatformUI.DialogWindowBase
type DialogWindow = class
    inherit DialogWindowBase
Public Class DialogWindow
Inherits DialogWindowBase
Inheritance
DialogWindow
Derived

Constructors

DialogWindow()

Initialize the dialog that does not have Help button

DialogWindow(String)

Initialize a dialog that has Help topic and buttons Use ShowModal() to display the dialog; it will get the parent window automatically from the shell

Properties

HasDialogFrame

Determines whether the window has a frame.

(Inherited from DialogWindowBase)
HasHelpButton

Determines whether the window has a help button.

(Inherited from DialogWindowBase)
HasMaximizeButton

Determines whether the window has a maximize button.

(Inherited from DialogWindowBase)
HasMinimizeButton

Determines whether the window has a minimize button.

(Inherited from DialogWindowBase)
IsCloseButtonEnabled

Gets or sets a value indicating whether the close title bar button should be enabled.

(Inherited from DialogWindowBase)

Methods

InvokeDialogHelp()

Invokes the Help for the dialog window.

OnClosed(EventArgs)

Handles the disposing of resources when the window closes.

(Inherited from DialogWindowBase)
OnDialogThemeChanged()

When overridden in a derived class, handles the event raised when the dialog window theme has changed.

(Inherited from DialogWindowBase)
OnSourceInitialized(EventArgs)

Handles the event raised when the window source has been initialized.

(Inherited from DialogWindowBase)
ShowModal()

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.

Applies to