Share via


ToolWindow.OnDocumentWindowChanged Method

Notifies derived classes if a user makes a change in the document window.

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

Syntax

'Declaration
Protected Overridable Sub OnDocumentWindowChanged ( _
    oldView As ModelingDocView, _
    newView As ModelingDocView _
)
protected virtual void OnDocumentWindowChanged(
    ModelingDocView oldView,
    ModelingDocView newView
)
protected:
virtual void OnDocumentWindowChanged(
    ModelingDocView^ oldView, 
    ModelingDocView^ newView
)
abstract OnDocumentWindowChanged : 
        oldView:ModelingDocView * 
        newView:ModelingDocView -> unit  
override OnDocumentWindowChanged : 
        oldView:ModelingDocView * 
        newView:ModelingDocView -> unit
protected function OnDocumentWindowChanged(
    oldView : ModelingDocView, 
    newView : ModelingDocView
)

Parameters

Remarks

This method is helpful if you want to create a tool window that tracks the current document and display another view of this document. This method is called when the tool window is first created and again when the document window changes. The view parameters can be null if the document window is a type that is not supported by the modeling shell framework.

Examples

The following example notifies derived classes when a user makes a change in the document window.

protected override void OnDocumentWindowChanged(ModelingDocView oldView, ModelingDocView newView)
{
     base.OnDocumentWindowChanged(oldView, newView);
} 

.NET Framework Security

See Also

Reference

ToolWindow Class

Microsoft.VisualStudio.Modeling.Shell Namespace