Class FlowchartLayout
Represents a class to arrange the nodes and connectors in a flowchart structure.
Inherited Members
Namespace: Syncfusion.UI.Xaml.Diagram.Layout
Assembly: Syncfusion.SfDiagram.WPF.dll
Syntax
public class FlowchartLayout : TreeLayoutBase, ILayout, IInternalLayout, INotifyPropertyChanged
Constructors
FlowchartLayout()
Initializes the new instance of the FlowchartLayout class.
Declaration
public FlowchartLayout()
Properties
LayoutRoot
Gets or sets the root node of the layout.
Declaration
public override object LayoutRoot { get; set; }
Property Value
Type |
---|
System.Object |
Overrides
NoBranchDirection
Gets or sets the direction of no branches.
Declaration
public BranchDirection NoBranchDirection { get; set; }
Property Value
Type |
---|
BranchDirection |
Examples
<!--Initializes the Layout-->
<syncfusion:FlowchartLayout x:Key="Layout" Orientation="LeftToRight" HorizontalSpacing="50" VerticalSpacing="30" YesBranchDirection="LeftInFlow" NoBranchDirection="RightInFlow">
</syncfusion:FlowchartLayout>
<!--Initializes the LayoutManager-->
<syncfusion:LayoutManager x:Key="layoutmanager" Layout="{StaticResource Layout}"/>
<!--Initializes the DataSourceSettings -->
<syncfusion:FlowchartDataSourceSettings x:Key="DataSourceSettings"
DataSource="{StaticResource Dataitems}"
ParentId="ParentId" Id="Id"
ShapeMapping="NodeShape"
WidthMapping="Width"
HeightMapping="Height"
ConnectorTextMapping="Label"
ContentMapping="Name"/>
<!--Initializes the SfDiagram -->
<syncfusion:SfDiagram x:Name="diagram" Grid.Column="0"
LayoutManager="{StaticResource layoutmanager}"
DataSourceSettings="{StaticResource DataSourceSettings}">
</syncfusion:SfDiagram>
NoBranchValues
Gets or sets the label text that identifies a no branch.
Declaration
public List<string> NoBranchValues { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<System.String> |
Orientation
Gets or sets the orientation of the layout.
Declaration
public FlowchartOrientation Orientation { get; set; }
Property Value
Type |
---|
FlowchartOrientation |
Examples
<!--Initializes the Layout-->
<syncfusion:FlowchartLayout x:Key="Layout" Orientation="LeftToRight" HorizontalSpacing="50" VerticalSpacing="30" YesBranchDirection="LeftInFlow" NoBranchDirection="RightInFlow">
</syncfusion:FlowchartLayout>
<!--Initializes the LayoutManager-->
<syncfusion:LayoutManager x:Key="layoutmanager" Layout="{StaticResource Layout}"/>
<!--Initializes the DataSourceSettings -->
<syncfusion:FlowchartDataSourceSettings x:Key="DataSourceSettings"
DataSource="{StaticResource Dataitems}"
ParentId="ParentId" Id="Id"
ShapeMapping="NodeShape"
WidthMapping="Width"
HeightMapping="Height"
ConnectorTextMapping="Label"
ContentMapping="Name"/>
<!--Initializes the SfDiagram -->
<syncfusion:SfDiagram x:Name="diagram" Grid.Column="0"
LayoutManager="{StaticResource layoutmanager}"
DataSourceSettings="{StaticResource DataSourceSettings}">
</syncfusion:SfDiagram>
YesBranchDirection
Gets or sets the direction of yes branches.
Declaration
public BranchDirection YesBranchDirection { get; set; }
Property Value
Type |
---|
BranchDirection |
Examples
<!--Initializes the Layout-->
<syncfusion:FlowchartLayout x:Key="Layout" Orientation="LeftToRight" HorizontalSpacing="50" VerticalSpacing="30" YesBranchDirection="LeftInFlow" NoBranchDirection="RightInFlow">
</syncfusion:FlowchartLayout>
<!--Initializes the LayoutManager-->
<syncfusion:LayoutManager x:Key="layoutmanager" Layout="{StaticResource Layout}"/>
<!--Initializes the DataSourceSettings -->
<syncfusion:FlowchartDataSourceSettings x:Key="DataSourceSettings"
DataSource="{StaticResource Dataitems}"
ParentId="ParentId" Id="Id"
ShapeMapping="NodeShape"
WidthMapping="Width"
HeightMapping="Height"
ConnectorTextMapping="Label" ContentMapping="Name"/>
<!--Initializes the SfDiagram -->
<syncfusion:SfDiagram x:Name="diagram" Grid.Column="0"
LayoutManager="{StaticResource layoutmanager}"
DataSourceSettings="{StaticResource DataSourceSettings}">
</syncfusion:SfDiagram>
YesBranchValues
Gets or sets the label text that identifies a yes branch.
Declaration
public List<string> YesBranchValues { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<System.String> |
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
OnPropertyChanged(String)
Invokes when a property value changes.
Declaration
protected override void OnPropertyChanged(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The Name of the property. |
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 |