WPF and Silverlight Edition Basic Library / Combo Box / ComboBox Features / Drop-Down List / Changing the Drop-Down List Direction
Changing the Drop-Down List Direction

By default, when the user clicks the C1ComboBox control's drop-down arrow at run-time, the drop-down list will appear below the control; if that is not possible, it will appear above the control. You can, however, change the direction in which the drop-down list appears by setting the DropDownDirection property to one of the following four options:

Event Description
BelowOrAbove (default) Tries to open the drop-down list below the header. If it is not possible tries to open above it.
AboveOrBelow Tries to open the drop-down list above the header. If it is not possible tries to open below it.
ForceBelow Forces the drop-down list to open below the header.
ForceAbove Forces the drop-down list to open above the header.

You can change the drop-down list direction using one of the following methods:

Complete the following steps:

  1. Add DropDownDirection="ForceAbove" to the <c1:C1ComboBox> tags so that the markup resembles the following:
XAML
Copy Code
<c1:C1ComboBox Width="249" DropDownDirection="ForceAbove">
  1. Run the program and click the drop-down arrow. Observe that the drop-down list appears above the control.