Welcome to the Xamarin.Forms feedback portal. We’re happy you’re here! If you have feedback on how to improve the Xamarin.Forms, we’d love to hear it!>
Thanks for joining our community and helping improve Syncfusion products!
Need to provide support to Add and Updated layouts such as Org Chart, Hierarchical layouts supports in SfDiagram UWP platform.
Sample code snippet:
var employees = new ObservableCollection<Employee>();
employees.Add(new Employee() { name = "Elizabeth", id = 1, parentId = 0, designation = "CEO" });
employees.Add(new Employee() { name = "Christina", id = 2, parentId = 1, designation = "Manager" });
employees.Add(new Employee() { name = "Yang", id = 3, parentId = 1, designation = "Manager" });
//Diagram layouting
diagram.DataSourceSettings = new DataSourceSettings() { DataSource = employees, Id = "id", ParentId = "parentId" };
diagram.LayoutManager = new LayoutManager()
{
Layout = new DirectedTreeLayout()
{
Type = LayoutType.Hierarchical,
HorizontalSpacing = 35,
}
};
diagram.LayoutManager.Layout.UpdateLayout();
Model Output: