Export (0) Print
Expand All

Slider.IsDirectionReversed Property

Gets or sets the direction of increasing value.

Namespace: System.Windows.Controls
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

[BindableAttribute(true)] 
public bool IsDirectionReversed { get; set; }
/** @property */
public boolean get_IsDirectionReversed ()

/** @property */
public void set_IsDirectionReversed (boolean value)

public function get IsDirectionReversed () : boolean

public function set IsDirectionReversed (value : boolean)

<object IsDirectionReversed="bool" .../>

Property Value

true if the direction of increasing value is to the left for a horizontal slider or down for a vertical slider; otherwise, false. The default value is false.

Identifier field

IsDirectionReversedProperty

Metadata properties set to true

None

The value of this property determines the direction of increasing value of a Slider. For example, when you move the Thumb control up on a vertical Slider when the IsDirectionReversed property is set to false, the Value of the Slider increases. If the value of the IsDirectionReversed property is changed to true, the Value of the Slider decreases as the Thumb moves up.

This property binds to the IsDirectionReversed property for the Track control that it implements.

The following example shows how to set the IsDirectionReversed property. For the complete sample, see Slider Sample.

<Slider Name="slider1" Width="100" 
        Orientation="Horizontal" HorizontalAlignment="Left" 
        IsSnapToTickEnabled="True" Minimum="1" Maximum="9" 
        TickPlacement="BottomRight"  TickFrequency="3"
        AutoToolTipPrecision="2" AutoToolTipPlacement="BottomRight"
        IsDirectionReversed="False"
        IsMoveToPointEnabled="False"/>

Slider hslider = new Slider();
hslider.Orientation = Orientation.Horizontal;
hslider.AutoToolTipPlacement =
  AutoToolTipPlacement.TopLeft;
hslider.AutoToolTipPrecision = 2;
hslider.IsDirectionReversed = true;
hslider.Width = 100;
hslider.IsMoveToPointEnabled = false;
hslider.SelectionStart = 1.1;
hslider.SelectionEnd = 3;
hslider.IsSelectionRangeEnabled = false;
hslider.IsSnapToTickEnabled = false;
hslider.TickFrequency = 3;
hslider.TickPlacement = TickPlacement.Both;
cv1.Children.Add(hslider);

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2014 Microsoft