Class TreeLayout
[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
OrientationProperty
public static readonly DependencyProperty OrientationProperty
Field Value
SpanProperty
public static readonly DependencyProperty SpanProperty
Field Value
Properties
Alignment
节点停靠方式
public HorizontalAlignment Alignment { get; set; }
Property Value
Orientation
树型节点的排列方式 水平和竖直
public Orientation Orientation { get; set; }
Property Value
Span
public double Span { get; set; }
Property Value
Methods
ArrangeNode(TreeNode, Point, Func<Point, Point>)
protected virtual void ArrangeNode(TreeNode node, Point point, Func<Point, Point> transfor)
Parameters
DoLayout(params Node[])
布局点和线
public override void DoLayout(params Node[] nodes)
Parameters
nodes
Node[]
DoLayoutLink(Link)
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
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
TranformAll(IEnumerable<TreeNode>)
protected virtual void TranformAll(IEnumerable<TreeNode> roots)
Parameters
roots
IEnumerable<TreeNode>