DialogPage.Window Property

Definition

Gets the window that is used as the user interface of the dialog page.

protected:
 virtual property System::Windows::Forms::IWin32Window ^ Window { System::Windows::Forms::IWin32Window ^ get(); };
[System.ComponentModel.Browsable(false)]
protected virtual System.Windows.Forms.IWin32Window Window { get; }
member this.Window : System.Windows.Forms.IWin32Window
Protected Overridable ReadOnly Property Window As IWin32Window

Property Value

An IWin32Window that provides the handle to the window that acts as the user interface for the dialog page.

Attributes

Remarks

By default this property returns a property grid that has an entry for each public property that supports conversion to and from strings through TypeConverter.

Visual Studio requires that Tools Options page windows must be constant and should not be re-created on successive calls. Some user interface controls, particularly Windows Forms controls, can create and destroy their window handles at will, and this must be avoided. One way of doing this is to return Windows Forms that are derived from UserControl.

If the window implements <xref:System.ComponentModelIComponent>, it is sited by the dialog page so that it can get access to global services.

Note

Typically, an instance of a dialog page class is its own automation object. Therefore, properties that are displayed are those of a class that is derived from DialogPage. However, if AutomationObject returns another object, it is that object's properties, and not the properties of the class, that are displayed.

Applies to