Class RadialTreeLayout
Represents a class to arrange the nodes and connectors automatically in a circular tree structure.
Inheritance
System.Object
RadialTreeLayout
Implements
System.ComponentModel.INotifyPropertyChanged
Assembly: Syncfusion.SfDiagram.UWP.dll
Syntax
public class RadialTreeLayout : TreeLayoutBase, ILayout, IInternalLayout, INotifyPropertyChanged
Examples
Below example shows how to create RadialTreeLayout
public class Employee
{
public string EmpId { get; set; }
public string Imageurl { get; set; }
public string ParentId { get; set; }
}
public class Employees : ObservableCollection<Employee>
{
}
<!--Initialize employee collection-->
<local:Employees x:Key="employees">
<local:Employee EmpId = "1" ParentId = "" Imageurl = "./Assets/Thomas.png" />
<local:Employee EmpId = "2" ParentId = "1" Imageurl = "./Assets/Clayton.png" />
<local:Employee EmpId = "3" ParentId = "1" Imageurl = "./Assets/eric.png" />
<local:Employee EmpId = "4" ParentId = "1" Imageurl = "./Assets/John.png" />
<local:Employee EmpId = "5" ParentId = "1" Imageurl = "./Assets/image12.png" />
<local:Employee EmpId = "6" ParentId = "1" Imageurl = "./Assets/image2.png" />
<local:Employee EmpId = "7" ParentId = "1" Imageurl = "./Assets/image3.png" />
<local:Employee EmpId = "8" ParentId = "1" Imageurl = "./Assets/image50.png" />
<local:Employee EmpId = "9" ParentId = "2" Imageurl = "./Assets/image51.png" />
<local:Employee EmpId = "10" ParentId = "2" Imageurl = "./Assets/image53.png" />
<local:Employee EmpId = "11" ParentId = "3" Imageurl = "./Assets/image54.png" />
<local:Employee EmpId = "12" ParentId = "3" Imageurl = "./Assets/image55.png" />
<local:Employee EmpId = "13" ParentId = "4" Imageurl = "./Assets/image56.png" />
<local:Employee EmpId = "14" ParentId = "4" Imageurl = "./Assets/image57.png" />
<local:Employee EmpId = "15" ParentId = "5" Imageurl = "./Assets/images7.png" />
<local:Employee EmpId = "16" ParentId = "5" Imageurl = "./Assets/images9.png" />
<local:Employee EmpId = "17" ParentId = "6" Imageurl = "./Assets/Jenny.png" />
<local:Employee EmpId = "18" ParentId = "6" Imageurl = "./Assets/John.png" />
<local:Employee EmpId = "19" ParentId = "7" Imageurl = "./Assets/eric.png" />
<local:Employee EmpId = "20" ParentId = "7" Imageurl = "./Assets/Maria.png" />
<local:Employee EmpId = "21" ParentId = "8" Imageurl = "./Assets/image12.png" />
<local:Employee EmpId = "22" ParentId = "8" Imageurl = "./Assets/Paul.png" />
<local:Employee EmpId = "23" ParentId = "9" Imageurl = "./Assets/Robin.png" />
<local:Employee EmpId = "24" ParentId = "9" Imageurl = "./Assets/smith.png" />
<local:Employee EmpId = "25" ParentId = "10" Imageurl = "./Assets/Thomas.png" />
<local:Employee EmpId = "26" ParentId = "10" Imageurl = "./Assets/Clayton.png" />
<local:Employee EmpId = "27" ParentId = "11" Imageurl = "./Assets/eric.png" />
<local:Employee EmpId = "28" ParentId = "11" Imageurl = "./Assets/images7.png" />
<local:Employee EmpId = "29" ParentId = "12" Imageurl = "./Assets/image12.png" />
<local:Employee EmpId = "30" ParentId = "12" Imageurl = "./Assets/image2.png" />
</local:Employees>
<!--Initializes the DataSourceSettings -->
<Syncfusion:DataSourceSettings x:Key="dataSourceSettings"
ParentId="ParentId" Id="EmpId"
DataSource="{StaticResource employees}"
Root="1"/>
<!--Initialize the Layout-->
<Syncfusion:RadialTreeLayout x:Key="treeLayout"
HorizontalSpacing="30"
VerticalSpacing="50" />
<!--Initialize the Layout Manager-->
<Syncfusion:LayoutManager x:Key="layoutManager" Layout="{StaticResource treeLayout}" />
<!--Initialize Diagram-->
<Syncfusion:SfDiagram x:Name="Diagram"
DataSourceSettings="{Binding dataSourceSettings}"
LayoutManager="{Binding layoutManager}"/>
Constructors
RadialTreeLayout()
Declaration
public RadialTreeLayout()
Properties
LayoutRoot
Gets or sets the root node of the layout.
Declaration
public override object LayoutRoot { get; set; }
Property Value
Overrides
Methods
InvalidateLayout()
Invalidates the arrange state (layout) for the element. After the invalidation, the element will have its layout updated, which will occur asynchronously unless subsequently forced by UpdateLayout().
Declaration
public override void InvalidateLayout()
Overrides
UpdateLayout()
Method to update the currently arranged Nodes and Connectors.
Declaration
public override void UpdateLayout()
Overrides
UpdateLayout(Object)
Method to update the currently arranged Nodes and Connectors.
Declaration
public override void UpdateLayout(object fixedNode)
Parameters
Type |
Name |
Description |
System.Object |
fixedNode |
The node which is used as anchor to layout
|
Overrides
Implements
System.ComponentModel.INotifyPropertyChanged
Extension Methods