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 Blend, in XAML, or in code.
At Design Time in Blend
To set the ExpandDirection property in Blend, complete the following steps:
1. Click the C1Expander control once to select it.
2. Under the Properties tab, 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 <c1:C1Expander> tag so that it appears similar to the following:
<c1:C1Expander ExpandDirection="Right" Width="150" Height="55">
In Code
To set the ExpandDirection property in code, complete the following steps:
1. Add x:Name="C1Expander1" to the <c1:C1Expander> tag so that the control will have a unique identifier for you to call in code.
2. Enter Code view and add the following code beneath the InitializeComponent() method:
C1Expander1.ExpandDirection = C1.Silverlight.Extended.ExpandDirection.Right
•C#
C1Expander1.ExpandDirection = C1.Silverlight.Extended.ExpandDirection.Right;
3. 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:
