Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
- API Level:
- 6
The ScrollBar class of nui component. It allows users to recognize the direction and the range of lists/content.
public class ScrollBar : Control, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
-
- Implements
-
Constructors
Declaration
API Level: 6
View Source
The constructor of ScrollBar with specific style.
Declaration
public ScrollBar(string style)
Parameters
Type |
Name |
Description |
String |
style |
style name
|
View Source
The constructor of ScrollBar with specific style.
Declaration
public ScrollBar(ScrollBarStyle scrollBarStyle)
Parameters
Type |
Name |
Description |
ScrollBarStyle |
scrollBarStyle |
The style object to initialize the ScrollBar.
|
Fields
Declaration
public static readonly BindableProperty CurrentValueProperty
Field Value
Declaration
public static readonly BindableProperty DirectionProperty
Field Value
Declaration
public static readonly BindableProperty DurationProperty
Field Value
Declaration
public static readonly BindableProperty MaxValueProperty
Field Value
Declaration
public static readonly BindableProperty MinValueProperty
Field Value
Declaration
public static readonly BindableProperty ThumbColorProperty
Field Value
Declaration
public static readonly BindableProperty ThumbSizeProperty
Field Value
Declaration
public static readonly BindableProperty TrackColorProperty
Field Value
Declaration
public static readonly BindableProperty TrackImageURLProperty
Field Value
Properties
View Source
The property to get/set the current value of the ScrollBar.
Declaration
public int CurrentValue { get; set; }
Property Value
ScrollBar scroll;
scroll.MaxValue = 100;
scroll.MinValue = 0;
try
{
scroll.CurrentValue = 50;
}
catch(ArgumentOutOfRangeException e)
{
Tizen.Log.Error(LogTag, "Failed to set Current value : " + e.Message);
}
API Level: 6
View Source
The property to get/set the direction of the ScrollBar.
Declaration
public ScrollBar.DirectionType Direction { get; set; }
Property Value
API Level: 6
Declaration
public uint Duration { get; set; }
Property Value
API Level: 6
View Source
The property to get/set the max value of the ScrollBar.
Declaration
public int MaxValue { get; set; }
Property Value
API Level: 6
View Source
The property to get/set the min value of the ScrollBar.
Declaration
public int MinValue { get; set; }
Property Value
API Level: 6
View Source
The property to get/set the color of the thumb object.
Declaration
public Color ThumbColor { get; set; }
Property Value
API Level: 6
View Source
The property to get/set the size of the thumb object.
Declaration
public Size ThumbSize { get; set; }
Property Value
ScrollBar scroll;
try
{
scroll.ThumbSize = new Size(500, 10, 0);
}
catch(InvalidOperationException e)
{
Tizen.Log.Error(LogTag, "Failed to set ThumbSize value : " + e.Message);
}
API Level: 6
View Source
The property to get/set the color of the track object.
Declaration
public Color TrackColor { get; set; }
Property Value
API Level: 6
View Source
The property to get/set the image URL of the track object.
Declaration
public string TrackImageURL { get; set; }
Property Value
API Level: 6
Methods
View Source
Apply style instance to the view.
Basically it sets the bindable property to the value of the bindable property with same name in the style.
Declaration
public override void ApplyStyle(ViewStyle style)
Parameters
Overrides
Declaration
protected override ViewStyle CreateViewStyle()
Returns
Type |
Description |
ViewStyle |
The default scrollbar style.
|
Overrides
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Type |
Name |
Description |
DisposeTypes |
type |
The DisposeTypes value.
|
Overrides
API Level: 6
Declaration
public override void OnInitialize()
Overrides
View Source
Method to set current value. The thumb object would move to the corresponding position with animation or not.
Declaration
public void SetCurrentValue(int currentValue, bool enableAnimation = true)
Parameters
Type |
Name |
Description |
Int32 |
currentValue |
The special current value.
|
Boolean |
enableAnimation |
Enable move with animation or not, the default value is true.
|
ScrollBar scroll;
scroll.MinValue = 0;
scroll.MaxValue = 100;
try
{
scroll.SetCurrentValue(50);
}
catch(ArgumentOutOfRangeException e)
{
Tizen.Log.Error(LogTag, "Failed to set current value : " + e.Message);
}
API Level: 6
Implements
Extension Methods