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.
public class ScrollableBase : Control, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
-
- Derived
-
- Implements
-
Constructors
Declaration
API Level: 8
View Source
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.
|
View Source
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
Declaration
public static readonly BindableProperty DecelerationRateProperty
Field Value
Declaration
public static readonly BindableProperty DecelerationThresholdProperty
Field Value
Declaration
public static readonly BindableProperty EnableOverShootingEffectProperty
Field Value
Declaration
public static readonly BindableProperty FadeScrollbarProperty
Field Value
Declaration
public static readonly BindableProperty HideScrollbarProperty
Field Value
Declaration
public static readonly BindableProperty LayoutProperty
Field Value
Declaration
public static readonly BindableProperty NoticeAnimationEndBeforePositionProperty
Field Value
Declaration
public static readonly BindableProperty PaddingProperty
Field Value
View Source
PageFlickThresholdProperty
PageFlickThresholdProperty
Declaration
public static readonly BindableProperty PageFlickThresholdProperty
Field Value
Declaration
public static readonly BindableProperty ScrollAlphaFunctionProperty
Field Value
Declaration
public static readonly BindableProperty ScrollAvailableAreaProperty
Field Value
Declaration
public static readonly BindableProperty ScrollbarProperty
Field Value
Declaration
public static readonly BindableProperty ScrollDurationProperty
Field Value
Declaration
public static readonly BindableProperty ScrollEnabledProperty
Field Value
Declaration
public static readonly BindableProperty ScrollingDirectionProperty
Field Value
Declaration
public static readonly BindableProperty ScrollingEventThresholdProperty
Field Value
Declaration
public static readonly BindableProperty SnapToPageProperty
Field Value
Declaration
public static readonly BindableProperty StepScrollDistanceProperty
Field Value
Declaration
public static readonly BindableProperty WheelScrollDistanceProperty
Field Value
Properties
Declaration
public List<View> Children { get; }
Property Value
Type |
Description |
List<View> |
|
API Level: 8
View Source
ContentContainer
Container which has content of ScrollableBase.
Declaration
public View ContentContainer { get; }
Property Value
API Level: 8
View Source
CurrentPage
Get current page.
Working property with SnapToPage property.
Declaration
public int CurrentPage { get; }
Property Value
API Level: 8
View Source
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
API Level: 8
View Source
Threshold not to go infinite at the end of scrolling animation.
Declaration
public float DecelerationThreshold { get; set; }
Property Value
View Source
Enable/Disable overshooting effect. default is disabled.
Declaration
public bool EnableOverShootingEffect { get; set; }
Property Value
View Source
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
Declaration
public bool HideScrollbar { get; set; }
Property Value
API Level: 8
View Source
Set the layout on this View. Replaces any existing Layout.
Declaration
public LayoutItem Layout { get; set; }
Property Value
API Level: 8
Declaration
public float NoticeAnimationEndBeforePosition { get; set; }
Property Value
Declaration
public Extents Padding { get; set; }
Property Value
View Source
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
API Level: 8
Declaration
public AlphaFunction ScrollAlphaFunction { get; set; }
Property Value
Declaration
public Vector2 ScrollAvailableArea { get; set; }
Property Value
API Level: 8
Declaration
public ScrollbarBase Scrollbar { get; set; }
Property Value
API Level: 8
View Source
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
API Level: 8
View Source
Duration of scroll animation.
Default value is 125ms.
Declaration
public int ScrollDuration { get; set; }
Property Value
API Level: 8
Declaration
public bool ScrollEnabled { get; set; }
Property Value
API Level: 8
View Source
Scrolling direction mode.
Default is Vertical scrolling.
Declaration
public ScrollableBase.Direction ScrollingDirection { get; set; }
Property Value
API Level: 8
View Source
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
View Source
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
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
public bool SnapToPage { get; set; }
Property Value
API Level: 8
View Source
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
View Source
Wheel scroll move distance.
This value decide how long distance will it moves in wheel event.
Declaration
public float WheelScrollDistance { get; set; }
Property Value
Methods
Declaration
protected override bool AccessibilityIsScrollable()
Returns
Overrides
Declaration
protected override bool AccessibilityScrollToChild(View child)
Parameters
Type |
Name |
Description |
View |
child |
|
Returns
Overrides
View Source
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
API Level: 8
View Source
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 |
Single |
position |
|
Returns
View Source
you can override it to custom your decelerating
Declaration
protected virtual void Decelerating(float velocity, Animation animation)
Parameters
Type |
Name |
Description |
Single |
velocity |
Velocity of current pan.
|
Animation |
animation |
Scroll animation.
|
View Source
you can override it to clean-up your own resources.
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Overrides
View Source
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.
|
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
This helps developer who wants to know before scroll is reaching target position.
Declaration
protected virtual void OnPreReachedTargetPosition(float targetPosition)
Parameters
Type |
Name |
Description |
Single |
targetPosition |
Index of item.
|
View Source
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 |
Boolean |
True if the wheel event should be consumed.
|
Overrides
View Source
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
API Level: 8
Declaration
public void RemoveAllChildren(bool dispose = false)
Parameters
Type |
Name |
Description |
Boolean |
dispose |
If true, removed child is disposed.
|
View Source
Scroll to specific position with or without animation.
Declaration
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
Scrolls to the item at the specified index.
Declaration
public void ScrollToIndex(int index)
Parameters
Type |
Name |
Description |
Int32 |
index |
Index of item.
|
API Level: 8
View Source
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()
API Level: 8
Declaration
protected virtual void UpdateScrollbar()
Events
View Source
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
API Level: 8
View Source
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
API Level: 8
View Source
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
API Level: 8
View Source
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
API Level: 8
View Source
An event emitted when scrolling, user can subscribe or unsubscribe to this event handler.
Declaration
public event EventHandler<ScrollEventArgs> Scrolling
Event Type
API Level: 8
View Source
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
Implements
Extension Methods