Class ScrollView
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
ScrollView contains views that can be scrolled manually (via touch).
C#Copypublic class ScrollView : Scrollable, IDynamicResourceHandler, IElement, INameScope, IElementController, System.IDisposable, IResourcesProvider
- Inheritance
- Implements
Constructors
Declaration
C#Copypublic ScrollView()
Fields
Declaration
C#Copypublic static readonly BindableProperty AxisAutoLockEnabledProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty OvershootXProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty OvershootYProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty PanningEnabledProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty PanningProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollDomainOffsetProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollDomainSizeProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollFinalProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollingProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollModeProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollPositionDeltaProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollPositionProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollPrePositionMaxProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty ScrollPrePositionProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty StartPagePositionProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty WheelScrollDistanceStepProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty WrapEnabledProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Declaration
C#Copypublic static readonly BindableProperty WrapProperty
Field Value
Type | Description |
---|---|
BindableProperty |
Properties
Declaration
C#Copypublic bool AxisAutoLockEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic float OvershootX { get; set; }
Property Value
Type | Description |
---|---|
Single |
Declaration
C#Copypublic float OvershootY { get; set; }
Property Value
Type | Description |
---|---|
Single |
Declaration
C#Copypublic bool Panning { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic bool PanningEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic Vector2 ScrollDomainOffset { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScrollDomainSize { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScrollFinal { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic bool Scrolling { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic PropertyMap ScrollMode { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
Declaration
C#Copypublic Vector2 ScrollPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScrollPositionDelta { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScrollPrePosition { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector2 ScrollPrePositionMax { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic Vector3 StartPagePosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
Declaration
C#Copypublic Vector2 WheelScrollDistanceStep { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Declaration
C#Copypublic bool Wrap { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Declaration
C#Copypublic bool WrapEnabled { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Declaration
C#Copypublic void ApplyEffect(ScrollViewEffect effect)
Parameters
Type | Name | Description |
---|---|---|
ScrollViewEffect | effect | The effect to apply to scroll view. |
BindView(View)
Binds view to this ScrollView. Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
Declaration
C#Copypublic void BindView(View child)
Parameters
Type | Name | Description |
---|---|---|
View | child | The view to add to this ScrollView. |
Declaration
C#Copyprotected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | the dispose type |
Overrides
Declaration
C#Copypublic bool GetAxisAutoLock()
Returns
Type | Description |
---|---|
Boolean | Whether Axis Auto Lock mode has been enabled or not. |
GetAxisAutoLockGradient()
Gets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
Declaration
C#Copypublic float GetAxisAutoLockGradient()
Returns
Type | Description |
---|---|
Single | The gradient, a value between 0.0 and 1.0f. |
GetCurrentPage()
Retrieves current scroll page based on ScrollView dimensions being the size of one page, and all pages laid out in
a grid fashion, increasing from left to right until the end of the X-domain.
Declaration
C#Copypublic uint GetCurrentPage()
Returns
Type | Description |
---|---|
UInt32 | The current scroll position. |
Declaration
C#Copypublic Vector2 GetCurrentScrollPosition()
Returns
Type | Description |
---|---|
Vector2 | The current scroll position. |
GetFlickSpeedCoefficient()
Gets the flick speed coefficient for ScrollView when flicking in free panning mode.
This is a constant which multiplies the input touch flick velocity to determine the actual velocity at which to move the scrolling area.
Declaration
C#Copypublic float GetFlickSpeedCoefficient()
Returns
Type | Description |
---|---|
Single | The flick speed coefficient is returned. |
GetFrictionCoefficient()
Gets the friction coefficient setting for ScrollView when flicking in free panning mode. This is a value in stage-diagonals per second^2, stage-diagonal = Length( stage.width, stage.height )
Declaration
C#Copypublic float GetFrictionCoefficient()
Returns
Type | Description |
---|---|
Single | Friction coefficient is returned. |
GetMaxFlickSpeed()
Gets the maximum flick speed setting for ScrollView when flicking in free panning mode.
This is a value in stage-diagonals per second.
Declaration
C#Copypublic float GetMaxFlickSpeed()
Returns
Type | Description |
---|---|
Single | Maximum flick speed is returned. |
GetMinimumDistanceForFlick()
Gets the minimum pan distance required for a flick gesture in pixels.
Declaration
C#Copypublic Vector2 GetMinimumDistanceForFlick()
Returns
Type | Description |
---|---|
Vector2 | Minimum pan distance vector with separate x and y distance. |
GetMinimumSpeedForFlick()
Returns the minimum pan speed required for a flick gesture in pixels per second.
Declaration
C#Copypublic float GetMinimumSpeedForFlick()
Returns
Type | Description |
---|---|
Single | Minimum pan speed. |
Declaration
C#Copypublic AlphaFunction GetScrollFlickAlphaFunction()
Returns
Type | Description |
---|---|
AlphaFunction | Current easing alpha function of the flick animation. |
Declaration
C#Copypublic float GetScrollFlickDuration()
Returns
Type | Description |
---|---|
Single | The time in seconds for the animation to take. |
Declaration
C#Copypublic AlphaFunction GetScrollSnapAlphaFunction()
Returns
Type | Description |
---|---|
AlphaFunction | Current easing alpha function of the snap animation. |
Declaration
C#Copypublic float GetScrollSnapDuration()
Returns
Type | Description |
---|---|
Single | The time in seconds for the animation to take. |
GetScrollUpdateDistance()
Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
Declaration
C#Copypublic int GetScrollUpdateDistance()
Returns
Type | Description |
---|---|
Int32 | Current scroll update distance. |
Declaration
C#Copyprotected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type | Name | Description |
---|---|---|
Tizen.System.Runtime.InteropServices.HandleRef | swigCPtr |
Overrides
Declaration
C#Copypublic void RemoveAllEffects()
Declaration
C#Copypublic void RemoveEffect(ScrollViewEffect effect)
Parameters
Type | Name | Description |
---|---|---|
ScrollViewEffect | effect | The effect to remove. |
Declaration
C#Copypublic void RemoveScrollingDirection(Radian direction)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The axis to constrain the scroll-view to. |
ScrollTo(UInt32)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(uint page)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | page | The page to scroll to. |
ScrollTo(UInt32, Single)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(uint page, float duration)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | page | The page to scroll to. |
Single | duration | The duration of the animation in seconds. |
ScrollTo(UInt32, Single, DirectionBias)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(uint page, float duration, DirectionBias bias)
Parameters
Type | Name | Description |
---|---|---|
UInt32 | page | The page to scroll to. |
Single | duration | The duration of the animation in seconds. |
DirectionBias | bias | Whether to bias scrolling to left or right. |
ScrollTo(View)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to center in on (via Scrolling). |
ScrollTo(View, Single)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(View view, float duration)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to center in on (via Scrolling). |
Single | duration | The duration of the animation in seconds. |
ScrollTo(Vector2)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(Vector2 position)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
ScrollTo(Vector2, Single)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(Vector2 position, float duration)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
Single | duration | The duration of the animation in seconds. |
ScrollTo(Vector2, Single, AlphaFunction)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(Vector2 position, float duration, AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
Single | duration | The duration of the animation in seconds. |
AlphaFunction | alpha | The alpha function to use. |
ScrollTo(Vector2, Single, AlphaFunction, DirectionBias, DirectionBias)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
Single | duration | The duration of the animation in seconds. |
AlphaFunction | alpha | Alpha function to use. |
DirectionBias | horizontalBias | Whether to bias scrolling to left or right. |
DirectionBias | verticalBias | Whether to bias scrolling to top or bottom. |
ScrollTo(Vector2, Single, DirectionBias, DirectionBias)
Scrolls View to position specified (contents will scroll to this position).
Declaration
C#Copypublic void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
Single | duration | The duration of the animation in seconds. |
DirectionBias | horizontalBias | Whether to bias scrolling to left or right. |
DirectionBias | verticalBias | Whether to bias scrolling to top or bottom. |
ScrollToSnapPoint()
Scrolls View to the nearest snap points as specified by the Rulers.
If already at snap points, then will return false, and not scroll.
Declaration
C#Copypublic bool ScrollToSnapPoint()
Returns
Type | Description |
---|---|
Boolean | True if Snapping necessary. |
SetAxisAutoLock(Boolean)
Enables or Disables Axis Auto Lock mode for panning within the ScrollView.
When enabled, any pan gesture that appears mostly horizontal or mostly
vertical, will be automatically restricted to horizontal only or vertical
only panning, until the pan gesture has completed.
Declaration
C#Copypublic void SetAxisAutoLock(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | Enables (true), or disables (false) AxisAutoLock mode. |
SetAxisAutoLockGradient(Single)
Sets the gradient threshold at which a panning gesture should be locked to the Horizontal or Vertical axis.
By default, this is 0.36 (0.36:1) which means angles less than 20 degrees to an axis will lock to that axis.
Declaration
C#Copypublic void SetAxisAutoLockGradient(float gradient)
Parameters
Type | Name | Description |
---|---|---|
Single | gradient | gradient A value between 0.0 and 1.0 (auto-lock for all angles). |
SetFlickSpeedCoefficient(Single)
Sets the flick speed coefficient for ScrollView when flicking in free panning mode.
This is a constant which multiplies the input touch flick velocity to determine the actual velocity at
which to move the scrolling area.
Declaration
C#Copypublic void SetFlickSpeedCoefficient(float speed)
Parameters
Type | Name | Description |
---|---|---|
Single | speed | The flick speed coefficient (default = 1.0). |
SetFrictionCoefficient(Single)
Sets the friction coefficient for ScrollView when flicking.
Declaration
C#Copypublic void SetFrictionCoefficient(float friction)
Parameters
Type | Name | Description |
---|---|---|
Single | friction | Friction coefficient must be greater than 0.0 (default = 1.0). |
SetMaxFlickSpeed(Single)
Sets the maximum flick speed for the ScrollView when flicking in free panning mode.
This is a value in stage-diagonals per second. stage-diagonal = Length( stage.width, stage.height ).
Declaration
C#Copypublic void SetMaxFlickSpeed(float speed)
Parameters
Type | Name | Description |
---|---|---|
Single | speed | Maximum flick speed (default = 3.0). |
Declaration
C#Copypublic void SetMaxOvershoot(float overshootX, float overshootY)
Parameters
Type | Name | Description |
---|---|---|
Single | overshootX | The maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f. |
Single | overshootY | The maximum number of vertically scrolled pixels before overshoot X reaches 1.0f. |
SetMinimumDistanceForFlick(Vector2)
Sets the minimum pan distance required for a flick in pixels.
Takes a Vector2 containing separate x and y values. As long as the pan distance exceeds one of these axes, a flick will be allowed.
Declaration
C#Copypublic void SetMinimumDistanceForFlick(Vector2 distance)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | distance | The flick speed coefficient (default = 1.0). |
SetMinimumSpeedForFlick(Single)
Sets the minimum pan speed required for a flick in pixels per second.
Declaration
C#Copypublic void SetMinimumSpeedForFlick(float speed)
Parameters
Type | Name | Description |
---|---|---|
Single | speed | The minimum pan speed for a flick. |
Declaration
C#Copypublic void SetRulerX(RulerPtr ruler)
Parameters
Type | Name | Description |
---|---|---|
RulerPtr | ruler |
Declaration
C#Copypublic void SetRulerY(RulerPtr ruler)
Parameters
Type | Name | Description |
---|---|---|
RulerPtr | ruler |
Declaration
C#Copypublic void SetScrollFlickAlphaFunction(AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
AlphaFunction | alpha | Easing alpha function of the flick animation. |
Declaration
C#Copypublic void SetScrollFlickDuration(float time)
Parameters
Type | Name | Description |
---|---|---|
Single | time | The time in seconds for the animation to take. |
SetScrollingDirection(Radian)
Allows the user to constrain the scroll view in a particular direction.
Declaration
C#Copypublic void SetScrollingDirection(Radian direction)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The axis to constrain the scroll-view to. |
SetScrollingDirection(Radian, Radian)
Allows the user to constrain the scroll view in a particular direction.
Declaration
C#Copypublic void SetScrollingDirection(Radian direction, Radian threshold)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The axis to constrain the scroll-view to. |
Radian | threshold | The threshold to apply around the axis. |
Declaration
C#Copypublic void SetScrollSensitive(bool sensitive)
Parameters
Type | Name | Description |
---|---|---|
Boolean | sensitive | True to enable scroll, false to disable scrolling. |
Declaration
C#Copypublic void SetScrollSnapAlphaFunction(AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
AlphaFunction | alpha | Easing alpha function of the snap animation. |
Declaration
C#Copypublic void SetScrollSnapDuration(float time)
Parameters
Type | Name | Description |
---|---|---|
Single | time | The time in seconds for the animation to take. |
SetScrollUpdateDistance(Int32)
Sets the distance needed to scroll for ScrollUpdatedSignal to be emitted.
The scroll update distance tells ScrollView how far to move before ScrollUpdatedSignal the informs application.
Each time the ScrollView crosses this distance the signal will be emitted.
Declaration
C#Copypublic void SetScrollUpdateDistance(int distance)
Parameters
Type | Name | Description |
---|---|---|
Int32 | distance | The distance for ScrollView to move before emitting update signal. |
SetSnapOvershootAlphaFunction(AlphaFunction)
Sets Snap Overshoot animation's AlphaFunction.
Declaration
C#Copypublic void SetSnapOvershootAlphaFunction(AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
AlphaFunction | alpha | Easing alpha function of the overshoot snap animation. |
Declaration
C#Copypublic void SetSnapOvershootDuration(float duration)
Parameters
Type | Name | Description |
---|---|---|
Single | duration | duration The duration of the overshoot snap animation. |
SetViewAutoSnap(Boolean)
Enables or Disables Actor Auto-Snap mode.
When Actor Auto-Snap mode has been enabled, ScrollView will automatically,
snap to the closest actor (The closest actor will appear in the center of the ScrollView).
Declaration
C#Copypublic void SetViewAutoSnap(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | Enables (true), or disables (false) Actor AutoSnap. |
SetWrapMode(Boolean)
Enables or Disables Wrap mode for ScrollView contents.
When enabled, the ScrollView contents are wrapped over the X/Y Domain.
Declaration
C#Copypublic void SetWrapMode(bool enable)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enable | Enables (true), or disables (false) Wrap Mode. |
UnbindView(View)
Unbinds view to this ScrollView. Once an actor is bound to a ScrollView, it will be subject to that ScrollView's properties.
Declaration
C#Copypublic void UnbindView(View child)
Parameters
Type | Name | Description |
---|---|---|
View | child | The view to remove to this ScrollView. |
Events
SnapStarted
SnapStarted can be used to subscribe or unsubscribe the event handler The SnapStarted signal is emitted when the ScrollView has started to snap or flick (it tells the target position, scale, rotation for the snap or flick).
Declaration
C#Copypublic event DaliEventHandler<object, ScrollView.SnapStartedEventArgs> SnapStarted
Event Type
Type | Description |
---|---|
DaliEventHandler<Object, ScrollView.SnapStartedEventArgs> |