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
oldView
Type: Microsoft.VisualStudio.Modeling.Shell.ModelingDocViewThe view for the document window in the previous frame.
newView
Type: Microsoft.VisualStudio.Modeling.Shell.ModelingDocViewThe view for the document window in the current frame.
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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.