Changing the Expand Direction
By default, the C1Expander control expands from top-to-bottom because its ExpandDirection property is set to Down. You can easily change the expand direction by setting the ExpandDirection property to Up, Right, or Left in the Properties window, in XAML, or in code.
At Design Time
To set the ExpandDirection property, complete the following steps:
1. Click the C1Expander control once to select it.
2. In the Properties window, click the ExpandDirection drop-down arrow and select one of the options from the list. For this example, select Right.
In XAML
To set the ExpandDirection property to Right in XAML, add ExpandDirection="Right" to the <c1ext:C1Expander> tag so that it appears similar to the following:
<c1ext:C1Expander ExpandDirection="Right" Name="C1Expander1" Width="150" Height="55">
In Code
To set the ExpandDirection property in code, complete the following steps:
1. Enter Code view and add the following code beneath the InitializeComponent() method:
C1Expander1.ExpandDirection = C1.WPF.Extended.ExpandDirection.Right
•C#
c1Expander1.ExpandDirection = C1.WPF.Extended.ExpandDirection.Right;
2. Run the program.
This Topic Illustrates the Following:
By following the instructions in this topic, you have learned how to set the ExpandDirection property. In this topic, you set the ExpandDirection property to Right, which will make the C1Expander control resemble the following: