Class ScrollView
Definition
- Assembly:
- Tizen.NUI.dll
ScrollView contains views that can be scrolled manually (via touch).
public class ScrollView : Scrollable, INotifyPropertyChanged, IDisposable
- Inheritance
-
objectTizen.NUI.Binding.BindableObjectTizen.NUI.Binding.ElementScrollView
- Implements
-
System.ComponentModel.INotifyPropertyChangedSystem.IDisposable
Constructors
View SourceScrollView()
Create an instance of ScrollView.
Declaration
public ScrollView()
Properties
View SourceAxisAutoLockEnabled
Sets and Gets AxisAutoLockEnabled property.
Declaration
public bool AxisAutoLockEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
OvershootX
Sets and Gets OvershootX property.
Declaration
public float OvershootX { get; set; }
Property Value
Type | Description |
---|---|
float |
OvershootY
Sets and Gets OvershootY property.
Declaration
public float OvershootY { get; set; }
Property Value
Type | Description |
---|---|
float |
Panning
Sets and Gets Panning property.
Declaration
public bool Panning { get; set; }
Property Value
Type | Description |
---|---|
bool |
PanningEnabled
Sets and Gets PanningEnabled property.
Declaration
public bool PanningEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
ScrollDomainOffset
Sets and Gets ScrollDomainOffset property.
Declaration
public Vector2 ScrollDomainOffset { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
ScrollDomainSize
Sets and Gets ScrollDomainSize property.
Declaration
public Vector2 ScrollDomainSize { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
ScrollFinal
Sets and Gets ScrollFinal property.
Declaration
public Vector2 ScrollFinal { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Scrolling
Sets and Gets Scrolling property.
Declaration
public bool Scrolling { get; set; }
Property Value
Type | Description |
---|---|
bool |
ScrollMode
Sets and Gets ScrollMode property.
Declaration
public PropertyMap ScrollMode { get; set; }
Property Value
Type | Description |
---|---|
PropertyMap |
ScrollPosition
Sets and Gets ScrollPosition property.
Declaration
public Vector2 ScrollPosition { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
ScrollPositionDelta
Sets and Gets ScrollPositionDelta property.
Declaration
public Vector2 ScrollPositionDelta { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
ScrollPrePosition
Sets and Gets ScrollPrePosition property.
Declaration
public Vector2 ScrollPrePosition { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
ScrollPrePositionMax
Sets and Gets ScrollPrePositionMax property.
Declaration
public Vector2 ScrollPrePositionMax { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
StartPagePosition
Sets and Gets StartPagePosition property.
Declaration
public Vector3 StartPagePosition { get; set; }
Property Value
Type | Description |
---|---|
Vector3 |
WheelScrollDistanceStep
Sets and Gets WheelScrollDistanceStep property.
Declaration
public Vector2 WheelScrollDistanceStep { get; set; }
Property Value
Type | Description |
---|---|
Vector2 |
Wrap
Sets and Gets Wrap property.
Declaration
public bool Wrap { get; set; }
Property Value
Type | Description |
---|---|
bool |
WrapEnabled
Sets and Gets WrapEnabled property.
Declaration
public bool WrapEnabled { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
View SourceApplyEffect(ScrollViewEffect)
Applies Effect to ScrollView.
Declaration
public 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
public void BindView(View child)
Parameters
Type | Name | Description |
---|---|---|
View | child | The view to add to this ScrollView. |
Dispose(DisposeTypes)
Dispose
Declaration
protected override void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | the dispose type |
Overrides
View SourceGetAxisAutoLock()
Returns state of Axis Auto Lock mode.
Declaration
public bool GetAxisAutoLock()
Returns
Type | Description |
---|---|
bool | 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
public float GetAxisAutoLockGradient()
Returns
Type | Description |
---|---|
float | 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
public uint GetCurrentPage()
Returns
Type | Description |
---|---|
uint | The current scroll position. |
GetCurrentScrollPosition()
Retrieves current scroll position.
Declaration
public 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
public float GetFlickSpeedCoefficient()
Returns
Type | Description |
---|---|
float | 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
public float GetFrictionCoefficient()
Returns
Type | Description |
---|---|
float | 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
public float GetMaxFlickSpeed()
Returns
Type | Description |
---|---|
float | Maximum flick speed is returned. |
GetMinimumDistanceForFlick()
Gets the minimum pan distance required for a flick gesture in pixels.
Declaration
public 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
public float GetMinimumSpeedForFlick()
Returns
Type | Description |
---|---|
float | Minimum pan speed. |
GetScrollFlickAlphaFunction()
Gets flick-animation's AlphaFunction.
Declaration
public AlphaFunction GetScrollFlickAlphaFunction()
Returns
Type | Description |
---|---|
AlphaFunction | Current easing alpha function of the flick animation. |
GetScrollFlickDuration()
Gets the time for the scroll flick-animation.
Declaration
public float GetScrollFlickDuration()
Returns
Type | Description |
---|---|
float | The time in seconds for the animation to take. |
GetScrollSnapAlphaFunction()
Gets snap-animation's AlphaFunction.
Declaration
public AlphaFunction GetScrollSnapAlphaFunction()
Returns
Type | Description |
---|---|
AlphaFunction | Current easing alpha function of the snap animation. |
GetScrollSnapDuration()
Gets the time for the scroll snap-animation.
Declaration
public float GetScrollSnapDuration()
Returns
Type | Description |
---|---|
float | The time in seconds for the animation to take. |
GetScrollUpdateDistance()
Gets the current distance needed to scroll for ScrollUpdatedSignal to be emitted.
Declaration
public int GetScrollUpdateDistance()
Returns
Type | Description |
---|---|
int | Current scroll update distance. |
GetWheelScrollDistanceStep()
Gets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.
Declaration
public Vector2 GetWheelScrollDistanceStep()
Returns
Type | Description |
---|---|
Vector2 | The step of scroll distance(pixel) in X and Y axes. |
RemoveAllEffects()
Remove All Effects from ScrollView.
Declaration
public void RemoveAllEffects()
RemoveEffect(ScrollViewEffect)
Removes Effect from ScrollView.
Declaration
public void RemoveEffect(ScrollViewEffect effect)
Parameters
Type | Name | Description |
---|---|---|
ScrollViewEffect | effect | The effect to remove. |
RemoveScrollingDirection(Radian)
Removes a direction constraint from the scroll view.
Declaration
public void RemoveScrollingDirection(Radian direction)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The axis to constrain the scroll-view to. |
ScrollTo(uint, float, DirectionBias)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(uint page, float duration, DirectionBias bias)
Parameters
Type | Name | Description |
---|---|---|
uint | page | The page to scroll to. |
float | duration | The duration of the animation in seconds. |
DirectionBias | bias | Whether to bias scrolling to left or right. |
ScrollTo(uint, float)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(uint page, float duration)
Parameters
Type | Name | Description |
---|---|---|
uint | page | The page to scroll to. |
float | duration | The duration of the animation in seconds. |
ScrollTo(uint)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(uint page)
Parameters
Type | Name | Description |
---|---|---|
uint | page | The page to scroll to. |
ScrollTo(View, float)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(View view, float duration)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to center in on (via Scrolling). |
float | duration | The duration of the animation in seconds. |
ScrollTo(View)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(View view)
Parameters
Type | Name | Description |
---|---|---|
View | view | The view to center in on (via Scrolling). |
ScrollTo(Vector2, float, AlphaFunction, DirectionBias, DirectionBias)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha, DirectionBias horizontalBias, DirectionBias verticalBias)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
float | 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, float, AlphaFunction)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(Vector2 position, float duration, AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
float | duration | The duration of the animation in seconds. |
AlphaFunction | alpha | The alpha function to use. |
ScrollTo(Vector2, float, DirectionBias, DirectionBias)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(Vector2 position, float duration, DirectionBias horizontalBias, DirectionBias verticalBias)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
float | 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. |
ScrollTo(Vector2, float)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(Vector2 position, float duration)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
float | duration | The duration of the animation in seconds. |
ScrollTo(Vector2)
Scrolls View to position specified (contents will scroll to this position).
Declaration
public void ScrollTo(Vector2 position)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | position | The position to scroll to. |
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
public bool ScrollToSnapPoint()
Returns
Type | Description |
---|---|
bool | True if Snapping necessary. |
SetAxisAutoLock(bool)
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
public void SetAxisAutoLock(bool enable)
Parameters
Type | Name | Description |
---|---|---|
bool | enable | Enables (true), or disables (false) AxisAutoLock mode. |
SetAxisAutoLockGradient(float)
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
public void SetAxisAutoLockGradient(float gradient)
Parameters
Type | Name | Description |
---|---|---|
float | gradient | gradient A value between 0.0 and 1.0 (auto-lock for all angles). |
SetFlickSpeedCoefficient(float)
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
public void SetFlickSpeedCoefficient(float speed)
Parameters
Type | Name | Description |
---|---|---|
float | speed | The flick speed coefficient (default = 1.0). |
SetFrictionCoefficient(float)
Sets the friction coefficient for ScrollView when flicking.
Declaration
public void SetFrictionCoefficient(float friction)
Parameters
Type | Name | Description |
---|---|---|
float | friction | Friction coefficient must be greater than 0.0 (default = 1.0). |
SetMaxFlickSpeed(float)
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
public void SetMaxFlickSpeed(float speed)
Parameters
Type | Name | Description |
---|---|---|
float | speed | Maximum flick speed (default = 3.0). |
SetMaxOvershoot(float, float)
Sets maximum overshoot amount.
Declaration
public void SetMaxOvershoot(float overshootX, float overshootY)
Parameters
Type | Name | Description |
---|---|---|
float | overshootX | The maximum number of horizontally scrolled pixels before overshoot X reaches 1.0f. |
float | 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
public void SetMinimumDistanceForFlick(Vector2 distance)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | distance | The flick speed coefficient (default = 1.0). |
SetMinimumSpeedForFlick(float)
Sets the minimum pan speed required for a flick in pixels per second.
Declaration
public void SetMinimumSpeedForFlick(float speed)
Parameters
Type | Name | Description |
---|---|---|
float | speed | The minimum pan speed for a flick. |
SetScrollFlickAlphaFunction(AlphaFunction)
Sets flick-animation's AlphaFunction.
Declaration
public void SetScrollFlickAlphaFunction(AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
AlphaFunction | alpha | Easing alpha function of the flick animation. |
SetScrollFlickDuration(float)
Sets the time for the scroll snap-animation.
Declaration
public void SetScrollFlickDuration(float time)
Parameters
Type | Name | Description |
---|---|---|
float | time | The time in seconds for the animation to take. |
SetScrollingDirection(Radian, Radian)
Allows the user to constrain the scroll view in a particular direction.
Declaration
public 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. |
SetScrollingDirection(Radian)
Allows the user to constrain the scroll view in a particular direction.
Declaration
public void SetScrollingDirection(Radian direction)
Parameters
Type | Name | Description |
---|---|---|
Radian | direction | The axis to constrain the scroll-view to. |
SetScrollSensitive(bool)
Sets scroll sensibility of pan gesture.
Declaration
public void SetScrollSensitive(bool sensitive)
Parameters
Type | Name | Description |
---|---|---|
bool | sensitive | True to enable scroll, false to disable scrolling. |
SetScrollSnapAlphaFunction(AlphaFunction)
Sets snap-animation's AlphaFunction.
Declaration
public void SetScrollSnapAlphaFunction(AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
AlphaFunction | alpha | Easing alpha function of the snap animation. |
SetScrollSnapDuration(float)
Sets the time for the scroll snap-animation.
Declaration
public void SetScrollSnapDuration(float time)
Parameters
Type | Name | Description |
---|---|---|
float | time | The time in seconds for the animation to take. |
SetScrollUpdateDistance(int)
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
public void SetScrollUpdateDistance(int distance)
Parameters
Type | Name | Description |
---|---|---|
int | distance | The distance for ScrollView to move before emitting update signal. |
SetSnapOvershootAlphaFunction(AlphaFunction)
Sets Snap Overshoot animation's AlphaFunction.
Declaration
public void SetSnapOvershootAlphaFunction(AlphaFunction alpha)
Parameters
Type | Name | Description |
---|---|---|
AlphaFunction | alpha | Easing alpha function of the overshoot snap animation. |
SetSnapOvershootDuration(float)
Sets Snap Overshoot animation's Duration.
Declaration
public void SetSnapOvershootDuration(float duration)
Parameters
Type | Name | Description |
---|---|---|
float | duration | duration The duration of the overshoot snap animation. |
SetViewAutoSnap(bool)
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
public void SetViewAutoSnap(bool enable)
Parameters
Type | Name | Description |
---|---|---|
bool | enable | Enables (true), or disables (false) Actor AutoSnap. |
SetWheelScrollDistanceStep(Vector2)
Sets the step of scroll distance in actor coordinates for each wheel event received in free panning mode.
Declaration
public void SetWheelScrollDistanceStep(Vector2 step)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | step | step The step of scroll distance(pixel) in X and Y axes. |
SetWrapMode(bool)
Enables or Disables Wrap mode for ScrollView contents.
When enabled, the ScrollView contents are wrapped over the X/Y Domain.
Declaration
public void SetWrapMode(bool enable)
Parameters
Type | Name | Description |
---|---|---|
bool | 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
public void UnbindView(View child)
Parameters
Type | Name | Description |
---|---|---|
View | child | The view to remove to this ScrollView. |
Events
View SourceSnapStarted
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
public event DaliEventHandler<object, ScrollView.SnapStartedEventArgs> SnapStarted
Event Type
Type | Description |
---|---|
DaliEventHandler<object, ScrollView.SnapStartedEventArgs> |