Table of Contents

Class Link

Namespace
H.Controls.Diagram
Assembly
H.Controls.Diagram.dll

连线

public class Link : Part, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, ILink
Inheritance
Link
Implements
Inherited Members
Extension Methods

Constructors

public Link()

Fields

public static readonly DependencyProperty FontSizeProperty

Field Value

DependencyProperty
public static readonly DependencyProperty ForegroundProperty

Field Value

DependencyProperty
public static readonly DependencyProperty PathStyleProperty

Field Value

DependencyProperty

Properties

public static ComponentResourceKey DashKey { get; }

Property Value

ComponentResourceKey
public static ComponentResourceKey DefaultKey { get; }

Property Value

ComponentResourceKey
public double FontSize { get; set; }

Property Value

double
public Brush Foreground { get; set; }

Property Value

Brush

从那个节点

public Node FromNode { get; set; }

Property Value

Node
public Port FromPort { get; set; }

Property Value

Port
public Style PathStyle { get; set; }

Property Value

Style

到哪个节点

public Node ToNode { get; set; }

Property Value

Node
public Port ToPort { get; set; }

Property Value

Port

Gets the number of visual child elements within this element.

protected override int VisualChildrenCount { get; }

Property Value

int

The number of visual child elements for this element.

Methods

Positions the single child element and determines the content of a ContentPresenter object.

protected override Size ArrangeOverride(Size finalSize)

Parameters

finalSize Size

Returns

Size

The actual size needed by the element.

清理逻辑关系

public override void Clear()
public static Link Create(Node from, Node to)

Parameters

from Node
to Node

Returns

Link
public static Link Create(Node fromNode, Node toNode, Port fromPort, Port toPort)

Parameters

fromNode Node
toNode Node
fromPort Port
toPort Port

Returns

Link

删除图层上的元素

public override void Delete()
public Node GetConnectNode(Node node)

Parameters

node Node

Returns

Node
public override Part GetNext()

Returns

Part
public override Part GetPrevious()

Returns

Part

Overrides GetVisualChild(int), and returns a child at the specified index from a collection of child elements.

protected override Visual GetVisualChild(int index)

Parameters

index int

The zero-based index of the requested child element in the collection.

Returns

Visual

The requested child element. This should not return null; if the provided index is out of range, an exception is thrown.

Determines the size of the ContentPresenter object based on the sizing properties, margin, and requested size of the child content.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

Returns

Size

The size that is required to arrange child content.

When overridden in a derived class, participates in rendering operations that are directed by the layout system. The rendering instructions for this element are not used directly when this method is invoked, and are instead preserved for later asynchronous use by layout and drawing.

protected override void OnRender(DrawingContext drawingContext)

Parameters

drawingContext DrawingContext

The drawing instructions for a specific element. This context is provided to the layout system.

public void SetDefaultMessage(string message)

Parameters

message string
public void Update()