Share via


Diagram.ActiveDiagramView Property

Gets the active view for the diagram.

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

Syntax

'Declaration
Public ReadOnly Property ActiveDiagramView As DiagramView
public DiagramView ActiveDiagramView { get; }
public:
property DiagramView^ ActiveDiagramView {
    DiagramView^ get ();
}
member ActiveDiagramView : DiagramView with get
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);
}

.NET Framework Security

See Also

Reference

Diagram Class

Microsoft.VisualStudio.Modeling.Diagrams Namespace