Class Link
连线
public class Link : FlowablePart, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, ILink
- Inheritance
-
Link
- Implements
- Inherited Members
- Extension Methods
Constructors
Link()
public Link()
Fields
FontSizeProperty
public static readonly DependencyProperty FontSizeProperty
Field Value
ForegroundProperty
public static readonly DependencyProperty ForegroundProperty
Field Value
PathStyleProperty
public static readonly DependencyProperty PathStyleProperty
Field Value
Properties
DashKey
public static ComponentResourceKey DashKey { get; }
Property Value
Data
public ILinkData Data { get; }
Property Value
DefaultKey
public static ComponentResourceKey DefaultKey { get; }
Property Value
FontSize
public double FontSize { get; set; }
Property Value
Foreground
public Brush Foreground { get; set; }
Property Value
FromNode
public Node FromNode { get; set; }
Property Value
FromPort
public Port FromPort { get; set; }
Property Value
PathStyle
public Style PathStyle { get; set; }
Property Value
ToNode
public Node ToNode { get; set; }
Property Value
ToPort
public Port ToPort { get; set; }
Property Value
VisualChildrenCount
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
ArrangeOverride(Size)
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.
Clear()
清理逻辑关系
public override void Clear()
Create(Node, Node)
public static Link Create(Node from, Node to)
Parameters
Returns
Create(Node, Node, Port, Port)
[Obsolete("CreateLinkTo")]
public static Link Create(Node fromNode, Node toNode, Port fromPort, Port toPort)
Parameters
Returns
Delete()
删除图层上的元素
public override void Delete()
GetConnectNode(Node)
public Node GetConnectNode(Node node)
Parameters
node
Node
Returns
GetNext()
public override Part GetNext()
Returns
GetPrevious()
public override Part GetPrevious()
Returns
GetVisualChild(int)
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
intThe 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.
MeasureOverride(Size)
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.
OnRender(DrawingContext)
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
DrawingContextThe drawing instructions for a specific element. This context is provided to the layout system.
SetDefaultMessage(string)
public void SetDefaultMessage(string message)
Parameters
message
string
Update()
public void Update()