OrgChart for WPF and Silverlight | ComponentOne
C1OrgChart Layout and Appearance / C1OrgChart Appearance Properties / Alignment
In This Topic
    Alignment
    In This Topic

    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:

    C1OrgChart for WPF

    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:

    C1OrgChart for WPF

    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:

    C1OrgChart for WPF