Compartilhar via


Diagram.ActiveDiagramView Property

Gets the active view for the diagram.

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

Syntax

'Declaração
Public ReadOnly Property ActiveDiagramView As DiagramView
    Get
public DiagramView ActiveDiagramView { get; }
public:
property DiagramView^ ActiveDiagramView {
    DiagramView^ get ();
}
member ActiveDiagramView : DiagramView
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