Class ScrollableBase
Definition
- Namespace:
- Tizen.NUI.Components
- Assembly:
- Tizen.NUI.Components.dll
This class provides a View that can scroll a single View with a layout. This View can be a nest of Views.
public class ScrollableBase : Control, IDynamicResourceHandler, INameScope, System.IDisposable, IResourcesProvider
- Inheritance
-
objectScrollableBase
- Derived
- Implements
-
System.IDisposable
Constructors
View SourceScrollableBase()
Default Constructor
Declaration
public ScrollableBase()
ScrollableBase(string)
Creates a new instance of a ScrollableBase with style.
Declaration
public ScrollableBase(string style)
Parameters
| Type | Name | Description |
|---|---|---|
| string | style | Creates ScrollableBase by special style defined in UX. |
ScrollableBase(ControlStyle)
Creates a new instance of a ScrollableBase with style.
Declaration
public ScrollableBase(ControlStyle style)
Parameters
| Type | Name | Description |
|---|---|---|
| ControlStyle | style | A style applied to the newly created ScrollableBase. |
Fields
View SourceDecelerationRateProperty
DecelerationRateProperty
Declaration
public static readonly BindableProperty DecelerationRateProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
DecelerationThresholdProperty
DecelerationThresholdProperty
Declaration
public static readonly BindableProperty DecelerationThresholdProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
EnableOverShootingEffectProperty
EnableOverShootingEffectProperty
Declaration
public static readonly BindableProperty EnableOverShootingEffectProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
FadeScrollbarProperty
FadeScrollbarProperty
Declaration
public static readonly BindableProperty FadeScrollbarProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
HideScrollbarProperty
HideScrollbarProperty
Declaration
public static readonly BindableProperty HideScrollbarProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
LayoutProperty
LayoutProperty
Declaration
public static readonly BindableProperty LayoutProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
NoticeAnimationEndBeforePositionProperty
NoticeAnimationEndBeforePositionProperty
Declaration
public static readonly BindableProperty NoticeAnimationEndBeforePositionProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
PaddingProperty
PaddingProperty
Declaration
public static readonly BindableProperty PaddingProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
PageFlickThresholdProperty
PageFlickThresholdProperty
Declaration
public static readonly BindableProperty PageFlickThresholdProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollAlphaFunctionProperty
ScrollAlphaFunctionProperty
Declaration
public static readonly BindableProperty ScrollAlphaFunctionProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollAvailableAreaProperty
ScrollAvailableAreaProperty
Declaration
public static readonly BindableProperty ScrollAvailableAreaProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollbarProperty
ScrollbarProperty
Declaration
public static readonly BindableProperty ScrollbarProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollDurationProperty
ScrollDurationProperty
Declaration
public static readonly BindableProperty ScrollDurationProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollEnabledProperty
ScrollEnabledProperty
Declaration
public static readonly BindableProperty ScrollEnabledProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollingDirectionProperty
ScrollingDirectionProperty
Declaration
public static readonly BindableProperty ScrollingDirectionProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
ScrollingEventThresholdProperty
ScrollingEventThresholdProperty
Declaration
public static readonly BindableProperty ScrollingEventThresholdProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
SnapToPageProperty
SnapToPageProperty
Declaration
public static readonly BindableProperty SnapToPageProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
StepScrollDistanceProperty
StepScrollDistanceProperty
Declaration
public static readonly BindableProperty StepScrollDistanceProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
WheelScrollDistanceProperty
WheelScrollDistanceProperty
Declaration
public static readonly BindableProperty WheelScrollDistanceProperty
Field Value
| Type | Description |
|---|---|
| BindableProperty |
Properties
View SourceChildren
List of children of Container.
Declaration
public List<View> Children { get; }
Property Value
| Type | Description |
|---|---|
| List<><View> |
ContentContainer
Container which has content of ScrollableBase.
Declaration
public View ContentContainer { get; }
Property Value
| Type | Description |
|---|---|
| View |
CurrentPage
Get current page. Working property with SnapToPage property.
Declaration
public int CurrentPage { get; }
Property Value
| Type | Description |
|---|---|
| int |
DecelerationRate
Deceleration rate of scrolling by finger. Rate should be bigger than 0 and smaller than 1. Default value is 0.998f;
Declaration
public float DecelerationRate { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
DecelerationThreshold
Threshold not to go infinite at the end of scrolling animation.
Declaration
public float DecelerationThreshold { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
EnableOverShootingEffect
Enable/Disable overshooting effect. default is disabled.
Declaration
public bool EnableOverShootingEffect { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
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
public bool FadeScrollbar { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
HideScrollbar
Always hide Scrollbar.
Declaration
public bool HideScrollbar { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
Layout
Set the layout on this View. Replaces any existing Layout.
Declaration
public LayoutItem Layout { get; set; }
Property Value
| Type | Description |
|---|---|
| LayoutItem |
NoticeAnimationEndBeforePosition
Notice before animation is finished.
Declaration
public float NoticeAnimationEndBeforePosition { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Padding
Padding for the ScrollableBase
Declaration
public Extents Padding { get; set; }
Property Value
| Type | Description |
|---|---|
| Extents |
PageFlickThreshold
Page will be changed when velocity of panning is over threshold. The unit of threshold is pixel per millisecond.
Declaration
public float PageFlickThreshold { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ScrollAlphaFunction
Alphafunction for scroll animation.
Declaration
public AlphaFunction ScrollAlphaFunction { get; set; }
Property Value
| Type | Description |
|---|---|
| AlphaFunction |
ScrollAvailableArea
Scroll Available area.
Declaration
public Vector2 ScrollAvailableArea { get; set; }
Property Value
| Type | Description |
|---|---|
| Vector2 |
Scrollbar
Scrollbar for ScrollableBase.
Declaration
public ScrollbarBase Scrollbar { get; set; }
Property Value
| Type | Description |
|---|---|
| ScrollbarBase |
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
public Position ScrollCurrentPosition { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ScrollDuration
Duration of scroll animation. Default value is 125ms.
Declaration
public int ScrollDuration { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
ScrollEnabled
Enable or disable scrolling.
Declaration
public bool ScrollEnabled { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
ScrollingDirection
Scrolling direction mode. Default is Vertical scrolling.
Declaration
public ScrollableBase.Direction ScrollingDirection { get; set; }
Property Value
| Type | Description |
|---|---|
| ScrollableBase.Direction |
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
public float ScrollingEventThreshold { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
ScrollPosition
Scroll position given to ScrollTo. This is the position in the opposite direction to the position of ContentContainer.
Declaration
public Position ScrollPosition { get; }
Property Value
| Type | Description |
|---|---|
| Position |
SnapToPage
Pages mode, enables moving to the next or return to current page depending on pan displacement. Default is false.
Declaration
public bool SnapToPage { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |
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
public float StepScrollDistance { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
WheelScrollDistance
Wheel scroll move distance. This value decide how long distance will it moves in wheel event.
Declaration
public float WheelScrollDistance { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Methods
View SourceAccessibilityIsScrollable()
Gets scrollable status.
Declaration
protected override bool AccessibilityIsScrollable()
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourceAccessibilityScrollToChild(View)
Declaration
protected override bool AccessibilityScrollToChild(View child)
Parameters
| Type | Name | Description |
|---|---|---|
| View | child |
Returns
| Type | Description |
|---|---|
| bool |
Overrides
View SourceAdd(View)
Called after a child has been added to the owning view.
Declaration
public override void Add(View view)
Parameters
| Type | Name | Description |
|---|---|---|
| View | view | The child which has been added. |
Overrides
View SourceAdjustTargetPositionOfScrollAnimation(float)
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
protected virtual float AdjustTargetPositionOfScrollAnimation(float position)
Parameters
| Type | Name | Description |
|---|---|---|
| float | position |
Returns
| Type | Description |
|---|---|
| float |
Decelerating(float, Animation)
you can override it to custom your decelerating
Declaration
protected virtual void Decelerating(float velocity, Animation animation)
Parameters
| Type | Name | Description |
|---|---|---|
| float | velocity | Velocity of current pan. |
| Animation | animation | Scroll animation. |
Dispose(DisposeTypes)
you can override it to clean-up your own resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
| Type | Name | Description |
|---|---|---|
| DisposeTypes | type | DisposeTypes |
Overrides
View SourceGetNextFocusableView(View, FocusDirection, bool)
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
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. |
| bool | 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 SourceOnPreReachedTargetPosition(float)
This helps developer who wants to know before scroll is reaching target position.
Declaration
protected virtual void OnPreReachedTargetPosition(float targetPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| float | targetPosition | Index of item. |
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
public override bool OnWheel(Wheel wheel)
Parameters
| Type | Name | Description |
|---|---|---|
| Wheel | wheel | The wheel event. |
Returns
| Type | Description |
|---|---|
| bool | True if the wheel event should be consumed. |
Overrides
View SourceRemove(View)
Called after a child has been removed from the owning view.
Declaration
public override void Remove(View view)
Parameters
| Type | Name | Description |
|---|---|---|
| View | view | The child which has been removed. |
Overrides
View SourceRemoveAllChildren(bool)
Remove all children in ContentContainer.
Declaration
public void RemoveAllChildren(bool dispose = false)
Parameters
| Type | Name | Description |
|---|---|---|
| bool | dispose | If true, removed child is disposed. |
ScrollTo(float, bool)
Scroll to specific position with or without animation.
Declaration
public void ScrollTo(float position, bool animate)
Parameters
| Type | Name | Description |
|---|---|---|
| float | position | Destination. |
| bool | animate | Scroll with or without animation |
ScrollToIndex(int)
Scrolls to the item at the specified index.
Declaration
public void ScrollToIndex(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | Index of item. |
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
protected virtual void SetScrollbar()
UpdateScrollbar()
Declaration
protected virtual void UpdateScrollbar()
Events
View SourceScrollAnimationEnded
An event emitted when the scrolling slide animation ends, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollEventArgs> ScrollAnimationEnded
Event Type
| Type | Description |
|---|---|
| EventHandler<><ScrollEventArgs> |
ScrollAnimationStarted
An event emitted when the scrolling slide animation starts, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollEventArgs> ScrollAnimationStarted
Event Type
| Type | Description |
|---|---|
| EventHandler<><ScrollEventArgs> |
ScrollDragEnded
An event emitted when user stops dragging ScrollableBase, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollEventArgs> ScrollDragEnded
Event Type
| Type | Description |
|---|---|
| EventHandler<><ScrollEventArgs> |
ScrollDragStarted
An event emitted when user starts dragging ScrollableBase, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollEventArgs> ScrollDragStarted
Event Type
| Type | Description |
|---|---|
| EventHandler<><ScrollEventArgs> |
Scrolling
An event emitted when scrolling, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollEventArgs> Scrolling
Event Type
| Type | Description |
|---|---|
| EventHandler<><ScrollEventArgs> |
ScrollOutOfBound
An event emitted when scrolling out of bound, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollOutOfBoundEventArgs> ScrollOutOfBound
Event Type
| Type | Description |
|---|---|
| EventHandler<><ScrollOutOfBoundEventArgs> |