The HorizontalContentAlignment and VerticalContentAlignment properties allow you to customize the alignment of nodes within the chart. The default value is Center for both properties, so nodes are centered within the tree. The images below show the effect of the other possible settings:
Left
If you set HorizontalContentAlignment to "Left":
XAML |
Copy Code
|
---|---|
<c1:C1OrgChart x:Name="_orgChart" HorizontalContentAlignment="Left" ItemTemplate="{StaticResource EmployeeTemplate }" > </c1:C1OrgChart> |
The OrgChart will appear as follows:
Stretch
If you set HorizontalContentAlignment to "Stretch":
XAML |
Copy Code
|
---|---|
<c1:C1OrgChart x:Name="_orgChart" HorizontalContentAlignment="Stretch" ItemTemplate="{StaticResource EmployeeTemplate }" > </c1:C1OrgChart> |
The OrgChart will appear as follows:
Right
If you set HorizontalContentAlignment to "Right":
XAML |
Copy Code
|
---|---|
<c1:C1OrgChart x:Name="_orgChart" HorizontalContentAlignment="Right" ItemTemplate="{StaticResource EmployeeTemplate }" > </c1:C1OrgChart> |
The OrgChart will appear as follows: