Class ScrollableBase

Definition

Namespace:
Tizen.NUI.Components
Assembly:
Tizen.NUI.Components.dll
API Level:
8

This class provides a View that can scroll a single View with a layout. This View can be a nest of Views.

C#
Copy
public class ScrollableBase : Control, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
Inheritance
Derived
Implements

Constructors

View Source

ScrollableBase()

Default Constructor

Declaration
C#
Copy
public ScrollableBase()
API Level: 8
View Source

ScrollableBase(String)

Creates a new instance of a ScrollableBase with style.

Declaration
C#
Copy
public ScrollableBase(string style)
Parameters
Type Name Description
String style

Creates ScrollableBase by special style defined in UX.

View Source

ScrollableBase(ControlStyle)

Creates a new instance of a ScrollableBase with style.

Declaration
C#
Copy
public ScrollableBase(ControlStyle style)
Parameters
Type Name Description
ControlStyle style

A style applied to the newly created ScrollableBase.

Fields

View Source

DecelerationRateProperty

DecelerationRateProperty

Declaration
C#
Copy
public static readonly BindableProperty DecelerationRateProperty
Field Value
Type Description
BindableProperty
View Source

DecelerationThresholdProperty

DecelerationThresholdProperty

Declaration
C#
Copy
public static readonly BindableProperty DecelerationThresholdProperty
Field Value
Type Description
BindableProperty
View Source

EnableOverShootingEffectProperty

EnableOverShootingEffectProperty

Declaration
C#
Copy
public static readonly BindableProperty EnableOverShootingEffectProperty
Field Value
Type Description
BindableProperty
View Source

FadeScrollbarProperty

FadeScrollbarProperty

Declaration
C#
Copy
public static readonly BindableProperty FadeScrollbarProperty
Field Value
Type Description
BindableProperty
View Source

HideScrollbarProperty

HideScrollbarProperty

Declaration
C#
Copy
public static readonly BindableProperty HideScrollbarProperty
Field Value
Type Description
BindableProperty
View Source

LayoutProperty

LayoutProperty

Declaration
C#
Copy
public static readonly BindableProperty LayoutProperty
Field Value
Type Description
BindableProperty
View Source

NoticeAnimationEndBeforePositionProperty

NoticeAnimationEndBeforePositionProperty

Declaration
C#
Copy
public static readonly BindableProperty NoticeAnimationEndBeforePositionProperty
Field Value
Type Description
BindableProperty
View Source

PaddingProperty

PaddingProperty

Declaration
C#
Copy
public static readonly BindableProperty PaddingProperty
Field Value
Type Description
BindableProperty
View Source

PageFlickThresholdProperty

PageFlickThresholdProperty

Declaration
C#
Copy
public static readonly BindableProperty PageFlickThresholdProperty
Field Value
Type Description
BindableProperty
View Source

ScrollAlphaFunctionProperty

ScrollAlphaFunctionProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollAlphaFunctionProperty
Field Value
Type Description
BindableProperty
View Source

ScrollAvailableAreaProperty

ScrollAvailableAreaProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollAvailableAreaProperty
Field Value
Type Description
BindableProperty
View Source

ScrollbarProperty

ScrollbarProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollbarProperty
Field Value
Type Description
BindableProperty
View Source

ScrollDurationProperty

ScrollDurationProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollDurationProperty
Field Value
Type Description
BindableProperty
View Source

ScrollEnabledProperty

ScrollEnabledProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollEnabledProperty
Field Value
Type Description
BindableProperty
View Source

ScrollingDirectionProperty

ScrollingDirectionProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollingDirectionProperty
Field Value
Type Description
BindableProperty
View Source

ScrollingEventThresholdProperty

ScrollingEventThresholdProperty

Declaration
C#
Copy
public static readonly BindableProperty ScrollingEventThresholdProperty
Field Value
Type Description
BindableProperty
View Source

SnapToPageProperty

SnapToPageProperty

Declaration
C#
Copy
public static readonly BindableProperty SnapToPageProperty
Field Value
Type Description
BindableProperty
View Source

StepScrollDistanceProperty

StepScrollDistanceProperty

Declaration
C#
Copy
public static readonly BindableProperty StepScrollDistanceProperty
Field Value
Type Description
BindableProperty
View Source

WheelScrollDistanceProperty

WheelScrollDistanceProperty

Declaration
C#
Copy
public static readonly BindableProperty WheelScrollDistanceProperty
Field Value
Type Description
BindableProperty

Properties

View Source

Children

List of children of Container.

Declaration
C#
Copy
public List<View> Children { get; }
Property Value
Type Description
List<View>
API Level: 8
View Source

ContentContainer

Container which has content of ScrollableBase.

Declaration
C#
Copy
public View ContentContainer { get; }
Property Value
Type Description
View
API Level: 8
View Source

CurrentPage

Get current page. Working property with SnapToPage property.

Declaration
C#
Copy
public int CurrentPage { get; }
Property Value
Type Description
Int32
API Level: 8
View Source

DecelerationRate

Deceleration rate of scrolling by finger. Rate should be bigger than 0 and smaller than 1. Default value is 0.998f;

Declaration
C#
Copy
public float DecelerationRate { get; set; }
Property Value
Type Description
Single
API Level: 8
View Source

DecelerationThreshold

Threshold not to go infinite at the end of scrolling animation.

Declaration
C#
Copy
public float DecelerationThreshold { get; set; }
Property Value
Type Description
Single
View Source

EnableOverShootingEffect

Enable/Disable overshooting effect. default is disabled.

Declaration
C#
Copy
public bool EnableOverShootingEffect { get; set; }
Property Value
Type Description
Boolean
View Source

FadeScrollbar

The boolean flag for automatic fading Scrollbar. Scrollbar will be faded out when scroll stay in certain position longer than the threshold. Scrollbar will be faded in scroll position changes.

Declaration
C#
Copy
public bool FadeScrollbar { get; set; }
Property Value
Type Description
Boolean
View Source

HideScrollbar

Always hide Scrollbar.

Declaration
C#
Copy
public bool HideScrollbar { get; set; }
Property Value
Type Description
Boolean
API Level: 8
View Source

Layout

Set the layout on this View. Replaces any existing Layout.

Declaration
C#
Copy
public LayoutItem Layout { get; set; }
Property Value
Type Description
LayoutItem
API Level: 8
View Source

NoticeAnimationEndBeforePosition

Notice before animation is finished.

Declaration
C#
Copy
public float NoticeAnimationEndBeforePosition { get; set; }
Property Value
Type Description
Single
View Source

Padding

Padding for the ScrollableBase

Declaration
C#
Copy
public Extents Padding { get; set; }
Property Value
Type Description
Extents
View Source

PageFlickThreshold

Page will be changed when velocity of panning is over threshold. The unit of threshold is pixel per millisecond.

Declaration
C#
Copy
public float PageFlickThreshold { get; set; }
Property Value
Type Description
Single
API Level: 8
View Source

ScrollAlphaFunction

Alphafunction for scroll animation.

Declaration
C#
Copy
public AlphaFunction ScrollAlphaFunction { get; set; }
Property Value
Type Description
AlphaFunction
View Source

ScrollAvailableArea

Scroll Available area.

Declaration
C#
Copy
public Vector2 ScrollAvailableArea { get; set; }
Property Value
Type Description
Vector2
API Level: 8
View Source

Scrollbar

Scrollbar for ScrollableBase.

Declaration
C#
Copy
public ScrollbarBase Scrollbar { get; set; }
Property Value
Type Description
ScrollbarBase
API Level: 8
View Source

ScrollCurrentPosition

Current scroll position in the middle of ScrollTo animation. This is the position in the opposite direction to the current position of ContentContainer.

Declaration
C#
Copy
public Position ScrollCurrentPosition { get; }
Property Value
Type Description
Position
API Level: 8
View Source

ScrollDuration

Duration of scroll animation. Default value is 125ms.

Declaration
C#
Copy
public int ScrollDuration { get; set; }
Property Value
Type Description
Int32
API Level: 8
View Source

ScrollEnabled

Enable or disable scrolling.

Declaration
C#
Copy
public bool ScrollEnabled { get; set; }
Property Value
Type Description
Boolean
API Level: 8
View Source

ScrollingDirection

Scrolling direction mode. Default is Vertical scrolling.

Declaration
C#
Copy
public ScrollableBase.Direction ScrollingDirection { get; set; }
Property Value
Type Description
ScrollableBase.Direction
API Level: 8
View Source

ScrollingEventThreshold

Scrolling event will be thrown when this amount of scroll position is changed. If this threshold becomes smaller, the tracking detail increases but the scrolling range that can be tracked becomes smaller. If large sized ContentContainer is required, please use larger threshold value. Default ScrollingEventThreshold value is 0.001f.

Declaration
C#
Copy
public float ScrollingEventThreshold { get; set; }
Property Value
Type Description
Single
View Source

ScrollPosition

Scroll position given to ScrollTo. This is the position in the opposite direction to the position of ContentContainer.

Declaration
C#
Copy
public Position ScrollPosition { get; }
Property Value
Type Description
Position
API Level: 8
View Source

SnapToPage

Pages mode, enables moving to the next or return to current page depending on pan displacement. Default is false.

Declaration
C#
Copy
public bool SnapToPage { get; set; }
Property Value
Type Description
Boolean
API Level: 8
View Source

StepScrollDistance

Step scroll move distance. Key focus originally moves focusable objects, but in ScrollableBase, if focusable object is too far or un-exist and ScrollableBase is focusable, it can scroll move itself by key input. this value decide how long distance will it moves in one step. if any value is not set, step will be moved quater size of ScrollableBase length.

Declaration
C#
Copy
public float StepScrollDistance { get; set; }
Property Value
Type Description
Single
View Source

WheelScrollDistance

Wheel scroll move distance. This value decide how long distance will it moves in wheel event.

Declaration
C#
Copy
public float WheelScrollDistance { get; set; }
Property Value
Type Description
Single

Methods

View Source

AccessibilityIsScrollable()

Gets scrollable status.

Declaration
C#
Copy
protected override bool AccessibilityIsScrollable()
Returns
Type Description
Boolean
Overrides
View Source

AccessibilityScrollToChild(View)

Declaration
C#
Copy
protected override bool AccessibilityScrollToChild(View child)
Parameters
Type Name Description
View child
Returns
Type Description
Boolean
Overrides
View Source

Add(View)

Called after a child has been added to the owning view.

Declaration
C#
Copy
public override void Add(View view)
Parameters
Type Name Description
View view

The child which has been added.

Overrides
API Level: 8
View Source

AdjustTargetPositionOfScrollAnimation(Single)

Adjust scrolling position by own scrolling rules. Override this function when developer wants to change destination of flicking.(e.g. always snap to center of item)

Declaration
C#
Copy
protected virtual float AdjustTargetPositionOfScrollAnimation(float position)
Parameters
Type Name Description
Single position
Returns
Type Description
Single
View Source

Decelerating(Single, Animation)

you can override it to custom your decelerating

Declaration
C#
Copy
protected virtual void Decelerating(float velocity, Animation animation)
Parameters
Type Name Description
Single velocity

Velocity of current pan.

Animation animation

Scroll animation.

View Source

Dispose(DisposeTypes)

you can override it to clean-up your own resources.

Declaration
C#
Copy
protected override void Dispose(DisposeTypes type)
Parameters
Type Name Description
DisposeTypes type

DisposeTypes

Overrides
View Source

GetNextFocusableView(View, View.FocusDirection, Boolean)

Gets the next keyboard focusable view in this control towards the given direction.
A control needs to override this function in order to support two dimensional keyboard navigation.

Declaration
C#
Copy
public override View GetNextFocusableView(View currentFocusedView, View.FocusDirection direction, bool loopEnabled)
Parameters
Type Name Description
View currentFocusedView

The current focused view.

View.FocusDirection direction

The direction to move the focus towards.

Boolean loopEnabled

Whether the focus movement should be looped within the control.

Returns
Type Description
View

The next keyboard focusable view in this control or null if no view can be focused.

Overrides
View Source

OnPreReachedTargetPosition(Single)

This helps developer who wants to know before scroll is reaching target position.

Declaration
C#
Copy
protected virtual void OnPreReachedTargetPosition(float targetPosition)
Parameters
Type Name Description
Single targetPosition

Index of item.

View Source

OnWheel(Wheel)

Called after a wheel event is received by the owning view.
CustomViewBehaviour.REQUIRES_WHEEL_EVENTS must be enabled during construction. See CustomView(ViewWrapperImpl.CustomViewBehaviour behaviour).

Declaration
C#
Copy
public override bool OnWheel(Wheel wheel)
Parameters
Type Name Description
Wheel wheel

The wheel event.

Returns
Type Description
Boolean

True if the wheel event should be consumed.

Overrides
View Source

Remove(View)

Called after a child has been removed from the owning view.

Declaration
C#
Copy
public override void Remove(View view)
Parameters
Type Name Description
View view

The child which has been removed.

Overrides
API Level: 8
View Source

RemoveAllChildren(Boolean)

Remove all children in ContentContainer.

Declaration
C#
Copy
public void RemoveAllChildren(bool dispose = false)
Parameters
Type Name Description
Boolean dispose

If true, removed child is disposed.

View Source

ScrollTo(Single, Boolean)

Scroll to specific position with or without animation.

Declaration
C#
Copy
public void ScrollTo(float position, bool animate)
Parameters
Type Name Description
Single position

Destination.

Boolean animate

Scroll with or without animation

API Level: 8
View Source

ScrollToIndex(Int32)

Scrolls to the item at the specified index.

Declaration
C#
Copy
public void ScrollToIndex(int index)
Parameters
Type Name Description
Int32 index

Index of item.

API Level: 8
View Source

SetScrollbar()

The composition of a Scrollbar can vary depending on how you use ScrollableBase. Set the composition that will go into the ScrollableBase according to your ScrollableBase.

Declaration
C#
Copy
protected virtual void SetScrollbar()
API Level: 8
View Source

UpdateScrollbar()

Declaration
C#
Copy
protected virtual void UpdateScrollbar()

Events

View Source

ScrollAnimationEnded

An event emitted when the scrolling slide animation ends, user can subscribe or unsubscribe to this event handler.

Declaration
C#
Copy
public event EventHandler<ScrollEventArgs> ScrollAnimationEnded
Event Type
Type Description
EventHandler<ScrollEventArgs>
API Level: 8
View Source

ScrollAnimationStarted

An event emitted when the scrolling slide animation starts, user can subscribe or unsubscribe to this event handler.

Declaration
C#
Copy
public event EventHandler<ScrollEventArgs> ScrollAnimationStarted
Event Type
Type Description
EventHandler<ScrollEventArgs>
API Level: 8
View Source

ScrollDragEnded

An event emitted when user stops dragging ScrollableBase, user can subscribe or unsubscribe to this event handler.

Declaration
C#
Copy
public event EventHandler<ScrollEventArgs> ScrollDragEnded
Event Type
Type Description
EventHandler<ScrollEventArgs>
API Level: 8
View Source

ScrollDragStarted

An event emitted when user starts dragging ScrollableBase, user can subscribe or unsubscribe to this event handler.

Declaration
C#
Copy
public event EventHandler<ScrollEventArgs> ScrollDragStarted
Event Type
Type Description
EventHandler<ScrollEventArgs>
API Level: 8
View Source

Scrolling

An event emitted when scrolling, user can subscribe or unsubscribe to this event handler.

Declaration
C#
Copy
public event EventHandler<ScrollEventArgs> Scrolling
Event Type
Type Description
EventHandler<ScrollEventArgs>
API Level: 8
View Source

ScrollOutOfBound

An event emitted when scrolling out of bound, user can subscribe or unsubscribe to this event handler.

Declaration
C#
Copy
public event EventHandler<ScrollOutOfBoundEventArgs> ScrollOutOfBound
Event Type
Type Description
EventHandler<ScrollOutOfBoundEventArgs>

Implements

Extension Methods