Table of Contents

Class TreeLayout

Namespace
H.Controls.Diagram
Assembly
H.Controls.Diagram.dll
[TypeConverter(typeof(DisplayNameConverter))]
public class TreeLayout : Layout, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, ILayout
Inheritance
TreeLayout
Implements
Inherited Members
Extension Methods

Fields

AlignmentProperty

public static readonly DependencyProperty AlignmentProperty

Field Value

DependencyProperty

OrientationProperty

public static readonly DependencyProperty OrientationProperty

Field Value

DependencyProperty

SpanProperty

public static readonly DependencyProperty SpanProperty

Field Value

DependencyProperty

Properties

Alignment

节点停靠方式

public HorizontalAlignment Alignment { get; set; }

Property Value

HorizontalAlignment

Orientation

树型节点的排列方式 水平和竖直

public Orientation Orientation { get; set; }

Property Value

Orientation

Span

public double Span { get; set; }

Property Value

double

Methods

ArrangeNode(TreeNode, Point, Func<Point, Point>)

protected virtual void ArrangeNode(TreeNode node, Point point, Func<Point, Point> transfor)

Parameters

node TreeNode
point Point
transfor Func<Point, Point>

DoLayout(params Node[])

布局点和线

public override void DoLayout(params Node[] nodes)

Parameters

nodes Node[]
public override void DoLayoutLink(Link link)

Parameters

link Link

GetRoots(IEnumerable<Node>)

protected virtual IEnumerable<TreeNode> GetRoots(IEnumerable<Node> nodes)

Parameters

nodes IEnumerable<Node>

Returns

IEnumerable<TreeNode>

LayoutRoots(IEnumerable<TreeNode>)

protected virtual void LayoutRoots(IEnumerable<TreeNode> roots)

Parameters

roots IEnumerable<TreeNode>

MeasureNode(Node)

获取子项树需要的宽度和高度

public Size MeasureNode(Node node)

Parameters

node Node

Returns

Size

TranformAll(IEnumerable<TreeNode>)

protected virtual void TranformAll(IEnumerable<TreeNode> roots)

Parameters

roots IEnumerable<TreeNode>