Diagram.ActiveDiagramView Property

Gets the active view for the diagram.

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

Syntax

'宣言
Public ReadOnly Property ActiveDiagramView As DiagramView
'使用
Dim instance As Diagram
Dim value As DiagramView

value = instance.ActiveDiagramView
public DiagramView ActiveDiagramView { get; }
public:
property DiagramView^ ActiveDiagramView {
    DiagramView^ get ();
}
public function get ActiveDiagramView () : DiagramView

Property Value

Type: Microsoft.VisualStudio.Modeling.Diagrams.DiagramView

The active view for the diagram.

Examples

public override void CreateConnection(DslDiagrams::ShapeElement sourceShapeElement, DslDiagrams::ShapeElement targetShapeElement, DslDiagrams::PaintFeedbackArgs paintFeedbackArgs)
{
    System.Collections.Generic.Dictionary<object, object> contextInfo = sourceShapeElement.Store.TransactionManager.CurrentTransaction.Context.ContextInfo;
    DslDiagrams::MouseAction activeMouseAction = sourceShapeElement.Diagram.ActiveDiagramView.ActiveMouseAction;
    contextInfo.Add(Constant.MouseToPointKey, activeMouseAction.CurrentPoint);
    contextInfo.Add(Constant.MouseFromPointKey, activeMouseAction.MouseDownPoint);                               

    base.CreateConnection(sourceShapeElement, targetShapeElement, paintFeedbackArgs);
}

Permissions

See Also

Reference

Diagram Class

Diagram Members

Microsoft.VisualStudio.Modeling.Diagrams Namespace