Share via


ToolWindow.OnToolWindowCreate Method

Listens for frame changes in a document window

Namespace:  Microsoft.VisualStudio.Modeling.Shell
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.Shell (in Microsoft.VisualStudio.Modeling.Sdk.Shell.dll)

Syntax

'Declaration
Protected Overridable Sub OnToolWindowCreate
'Usage
Me.OnToolWindowCreate()
protected virtual void OnToolWindowCreate()
protected:
virtual void OnToolWindowCreate()
protected function OnToolWindowCreate()

Remarks

This method is called from the OnCreate method when the tool window is created.

Derived classes are notified if a frame change is detected and the frame is assigned to the document window that is being monitored.

Examples

The following example creates the label that reads This is the custom tool window for the tool window.

protected override void OnToolWindowCreate()
{
     this.myLabel = new Label();
     this.myLabel.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     this.myLabel.Text = "This is the custom tool window";
}

.NET Framework Security

See Also

Reference

ToolWindow Class

ToolWindow Members

Microsoft.VisualStudio.Modeling.Shell Namespace