Basic Library for WPF and Silverlight | ComponentOne
WPF and Silverlight Edition Basic Library / RangeSlider / RangeSlider Features / Orientation
In This Topic
    Orientation
    In This Topic

    C1RangeSlider includes the ability to orient the control either horizontally or vertically using the Orientation property. By default the control initially appears with a horizontal orientation when added to the application, as in the following image:

    You can easily change the orientation from the Properties window, in XAML, and in code using the Orientation property:

    To set the Orientation property to Vertical add Orientation="Vertical" to the <c1:C1RangeSlider> tag so that it appears similar to the following:

    XAML
    Copy Code
    <c1:C1RangeSlider Name="C1RangeSlider1" Width="26" Orientation="Vertical" />
    

    To set the Orientation property to Vertical, add the following code to your project:

    Visual Basic
    Copy Code
    Me.C1RangeSlider1.Orientation = Orientation.Vertical
    

     

    C#
    Copy Code
    this.c1RangeSlider1.Orientation = Orientation.Vertical;
    

    To set the Orientation property to Vertical at Design time, complete the following steps:

    1. Click the C1RangeSlider control once to select it.
    2. Navigate to the Properties window and locate the Orientation property.
    3. Click the drop-down arrow next to the Orientation property and choose Vertical.

    This will change the Orientation property so that the control appears vertically.

    Run the application and observe:

    The C1RangeSlider control will be shown vertically: