次の方法で共有


DialogPage.Window Property

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

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)

Syntax

'宣言
<BrowsableAttribute(False)> _
Protected Overridable ReadOnly Property Window As IWin32Window
[BrowsableAttribute(false)]
protected virtual IWin32Window Window { get; }

Property Value

Type: System.Windows.Forms.IWin32Window
An IWin32Window that provides the handle to the window that acts as the user interface for the dialog page.

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 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.

.NET Framework Security

See Also

Reference

DialogPage Class

Microsoft.VisualStudio.Shell Namespace

Component

System.Windows.Forms

IWin32Window

DialogPage

Other Resources

Options Pages

Toolbox (Visual Studio SDK)

State Persistence and the Visual Studio IDE