Class Scrollbar
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
The Scrollbar is a component that contains track and thumb to indicate the current scrolled position of a scrollable object.
C#Copypublic class Scrollbar : ScrollbarBase, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
- Implements
Constructors
Declaration
C#Copypublic Scrollbar()
Scrollbar(Single, Single, Single, Boolean)
Create a Scrollbar and initialize with properties.
Declaration
C#Copypublic Scrollbar(float contentLength, float viewportLength, float currentPosition, bool isHorizontal = false)
Parameters
Type | Name | Description |
---|---|---|
Single | contentLength | The length of the scrollable content area. |
Single | viewportLength | The length of the viewport representing the amount of visible content. |
Single | currentPosition | The current position of the viewport in scrollable content area. This is the viewport's top position if the scroller is vertical, otherwise, left. |
Boolean | isHorizontal | Whether the direction of scrolling is horizontal or not. It is vertical by default. |
Scrollbar(ScrollbarStyle)
Create an empty Scrollbar with a ScrollbarStyle instance to set style properties.
Declaration
C#Copypublic Scrollbar(ScrollbarStyle style)
Parameters
Type | Name | Description |
---|---|---|
ScrollbarStyle | style |
Fields
Declaration
C#Copypublic static readonly BindableProperty ThumbColorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ThumbHorizontalImageUrlProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ThumbThicknessProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ThumbVerticalImageUrlProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty TrackColorProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty TrackPaddingProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty TrackThicknessProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
ScrollCurrentPosition
Current scroll position in the middle of ScrollTo or Update animation.
Declaration
C#Copypublic override float ScrollCurrentPosition { get; }
Property Value
Type | Description |
---|---|
Single |
Overrides
Declaration
C#Copypublic override float ScrollPosition { get; }
Property Value
Type | Description |
---|---|
Single |
Overrides
Declaration
C#Copypublic Color ThumbColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Declaration
C#Copypublic string ThumbHorizontalImageUrl { get; set; }
Property Value
Type | Description |
---|---|
String |
Declaration
C#Copypublic float ThumbThickness { get; set; }
Property Value
Type | Description |
---|---|
Single |
Declaration
C#Copypublic string ThumbVerticalImageUrl { get; set; }
Property Value
Type | Description |
---|---|
String |
Declaration
C#Copypublic Color TrackColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
TrackPadding
The padding value of the track. Note that when the scrollbar is for vertical direction, Start value is ignored. In case of horizontal direction, Top value is ignored.
Declaration
C#Copypublic Extents TrackPadding { get; set; }
Property Value
Type | Description |
---|---|
Extents |
Declaration
C#Copypublic float TrackThickness { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
ApplyStyle(ViewStyle)
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
C#Copypublic override void ApplyStyle(ViewStyle viewStyle)
Parameters
Type | Name | Description |
---|---|---|
ViewStyle | viewStyle |
Overrides
Declaration
C#Copyprotected override ViewStyle CreateViewStyle()
Returns
Type | Description |
---|---|
ViewStyle |
Overrides
Declaration
C#Copypublic override void Initialize(float contentLength, float viewportLength, float currentPosition, bool isHorizontal = false)
Parameters
Type | Name | Description |
---|---|---|
Single | contentLength | The length of the scrollable content area. |
Single | viewportLength | The length of the viewport representing the amount of visible content. |
Single | currentPosition | The current position of the viewport in scrollable content area. This is the viewport's top position if the scroller is vertical, otherwise, left. |
Boolean | isHorizontal | Whether the direction of scrolling is horizontal or not. It is vertical by default. |
Overrides
Declaration
C#Copypublic override void OnInitialize()
Overrides
OnRelayout(Vector2, RelayoutContainer)
Called after the size negotiation has been finished for this control.
The control is expected to assign this given size to itself or its children.
Should be overridden by derived classes if they need to layout views differently after certain operations like add or remove views, resize, or after changing specific properties.
As this function is called from inside the size negotiation algorithm, you cannot call RequestRelayout (the call would just be ignored).
Declaration
C#Copypublic override void OnRelayout(Vector2 size, RelayoutContainer container)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | size | The allocated size. |
RelayoutContainer | container | The control should add views to this container that it is not able to allocate a size for. |
Overrides
Declaration
C#Copypublic override void ScrollTo(float position, uint durationMs = null, AlphaFunction alphaFunction = null)
Parameters
Type | Name | Description |
---|---|---|
Single | position | The destination to scroll. |
UInt32 | durationMs | The time it takes to scroll in milliseconds. |
AlphaFunction | alphaFunction | The timing function used in animation. It describes the rate of change of the animation parameter over time. (e.g. EaseOut) |
Overrides
Remarks
Please note that, for now, only alpha functions created with BuiltinFunctions are valid when animating. Otherwise, it will be treated as a linear alpha function.
Update(Single, Single, Single, UInt32, AlphaFunction)
Update content length and position at once.
Declaration
C#Copypublic override void Update(float contentLength, float viewportLength, float position, uint durationMs = null, AlphaFunction alphaFunction = null)
Parameters
Type | Name | Description |
---|---|---|
Single | contentLength | The total length of the content. |
Single | viewportLength | The length of the viewport representing the amount of visible content. |
Single | position | The destination position of the View in content length. This is the View's top position if the scroller is vertical, otherwise, View's left position. |
UInt32 | durationMs | The time it takes to scroll in milliseconds. |
AlphaFunction | alphaFunction | The timing function used in animation. It describes the rate of change of the animation parameter over time. (e.g. EaseOut) |
Overrides
Update(Single, Single, UInt32, AlphaFunction)
Update content length and position at once.
Declaration
C#Copypublic override void Update(float contentLength, float position, uint durationMs = null, AlphaFunction alphaFunction = null)
Parameters
Type | Name | Description |
---|---|---|
Single | contentLength | The total length of the content. |
Single | position | The destination position of the View in content length. This is the View's top position if the scroller is vertical, otherwise, View's left position. |
UInt32 | durationMs | The time it takes to scroll in milliseconds. |
AlphaFunction | alphaFunction | The timing function used in animation. It describes the rate of change of the animation parameter over time. (e.g. EaseOut) |