Intersoft ClientUI Documentation
IsSnapToTickEnabled Property
See Also  Send Feedback
Intersoft.Client.UI.Aqua.UXInput Namespace > UXSliderBarBase Class : IsSnapToTickEnabled Property






Gets or sets a value that indicates whether the slider bar automatically moves the UXThumb to the closest tick bar item.

Syntax

Visual Basic (Declaration) 
<CategoryAttribute("Common Properties")>
Public Property IsSnapToTickEnabled As Boolean
Visual Basic (Usage)Copy Code
Dim instance As UXSliderBarBase
Dim value As Boolean
 
instance.IsSnapToTickEnabled = value
 
value = instance.IsSnapToTickEnabled
C# 
[CategoryAttribute("Common Properties")]
public bool IsSnapToTickEnabled {get; set;}
Delphi 
public read-write property IsSnapToTickEnabled: Boolean; 
JScript 
CategoryAttribute("Common Properties")
public function get,set IsSnapToTickEnabled : boolean
Managed Extensions for C++ 
[CategoryAttribute("Common Properties")]
public: __property bool get_IsSnapToTickEnabled();
public: __property void set_IsSnapToTickEnabled( 
   bool value
);
C++/CLI 
[CategoryAttribute("Common Properties")]
public:
property bool IsSnapToTickEnabled {
   bool get();
   void set (    bool value);
}

Remarks

You can enable snap to tick behaviour in UXSliderBar using IsSnapToTickEnabled property. When this property is enabled, all user interaction to change the value will be adjusted to the closest tickbar item. When you select a value within a tickbar range, the value will be adjusted and changed to the closest tickbar item. For example, when you select 3.2 as the value of a UXSliderBar that starts from 0 to 10 with LargeChange set to 1, the value will be adjusted to the closest tickbar item, which is 3.

View Copy Code
<Intersoft:UXSliderBar TickPlacement="BottomRight" HandlesVisibility="Visible" IsSnapToTickEnabled="True" />
            

Snap to tick behavior is implemented in all user interaction of UXSliderBar. When you press the arrow keys or handle buttons, the UXThumb will snap to the previous or next tickbar item. When you drag UXThumb and moves along the track, the UXThumb will snap to the previous or next tickbar item based on the movement.

When snap to tick behavior is enabled, you can still enable precision selection by pressing Ctrl key. If you press Ctrl key while pressing the keyboard keys or buttons or moving the UXThumb, UXThumb will not snap to the closest tickbar item.

Since this behavior is implemented for user interaction only, you can still set the value of UXSliderBar programmatically without invoking the snap to tick. For example: if you use UXButton to set the value of UXSliderBar to 2.8, UXSliderBar will not adjust the value to the closest tickbar item.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2012 All Rights Reserved.