Class ScrollViewExtensions
Namespace: Aspid.FastTools.UIElements
Assembly: Aspid.FastTools.dll
Provides extension methods for ScrollView.
public static class ScrollViewExtensions
Inheritance
Methods
SetElasticAnimationIntervalMs<T>(T, long)
Sets elasticAnimationIntervalMs.
public static T SetElasticAnimationIntervalMs<T>(this T element, long value) where T : ScrollView
Parameters
element T
The element to modify.
value long
The minimum interval between elastic and inertia animation updates in milliseconds.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetElasticity<T>(T, float)
Sets elasticity.
public static T SetElasticity<T>(this T element, float value) where T : ScrollView
Parameters
element T
The element to modify.
value float
The elasticity of the bounce at the content edges, clamped to 0 or more.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetHorizontalPageSize<T>(T, float)
Sets horizontalPageSize.
public static T SetHorizontalPageSize<T>(this T element, float value) where T : ScrollView
Parameters
element T
The element to modify.
value float
The horizontal page size in pixels; -1 derives it from the scroller.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetHorizontalScrollerVisibility<T>(T, ScrollerVisibility)
Sets horizontalScrollerVisibility.
public static T SetHorizontalScrollerVisibility<T>(this T element, ScrollerVisibility value) where T : ScrollView
Parameters
element T
The element to modify.
value ScrollerVisibility
The visibility of the horizontal scroller to set.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetMode<T>(T, ScrollViewMode)
Sets mode.
public static T SetMode<T>(this T element, ScrollViewMode value) where T : ScrollView
Parameters
element T
The element to modify.
value ScrollViewMode
The scrolling directions to set.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetMouseWheelScrollSize<T>(T, float)
Sets mouseWheelScrollSize.
public static T SetMouseWheelScrollSize<T>(this T element, float value) where T : ScrollView
Parameters
element T
The element to modify.
value float
The pixels scrolled per unit of mouse wheel delta; replaces the single-line height from the theme.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
Remarks
Setting the default value 18 on a new ScrollView does not override the theme.
SetNestedInteractionKind<T>(T, NestedInteractionKind)
Sets nestedInteractionKind.
public static T SetNestedInteractionKind<T>(this T element, ScrollView.NestedInteractionKind value) where T : ScrollView
Parameters
element T
The element to modify.
value ScrollView.NestedInteractionKind
How scrolling passes to a parent scroll view when this one reaches its limit.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetScrollDecelerationRate<T>(T, float)
Sets scrollDecelerationRate.
public static T SetScrollDecelerationRate<T>(this T element, float value) where T : ScrollView
Parameters
element T
The element to modify.
value float
The deceleration rate of inertial scrolling, clamped to 0 or more.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetScrollOffset<T>(T, Vector2)
Sets scrollOffset.
public static T SetScrollOffset<T>(this T element, Vector2 value) where T : ScrollView
Parameters
element T
The element to modify.
value Vector2
The scroll offset in pixels.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
Remarks
The scrollers limit the offset to the scrollable range, so add the content and wait for the layout first.
SetTouchScrollBehavior<T>(T, TouchScrollBehavior)
Sets touchScrollBehavior.
public static T SetTouchScrollBehavior<T>(this T element, ScrollView.TouchScrollBehavior value) where T : ScrollView
Parameters
element T
The element to modify.
value ScrollView.TouchScrollBehavior
How touch scrolling behaves at the content edges.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetVerticalPageSize<T>(T, float)
Sets verticalPageSize.
public static T SetVerticalPageSize<T>(this T element, float value) where T : ScrollView
Parameters
element T
The element to modify.
value float
The vertical page size in pixels; -1 derives it from the scroller.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.
SetVerticalScrollerVisibility<T>(T, ScrollerVisibility)
Sets verticalScrollerVisibility.
public static T SetVerticalScrollerVisibility<T>(this T element, ScrollerVisibility value) where T : ScrollView
Parameters
element T
The element to modify.
value ScrollerVisibility
The visibility of the vertical scroller to set.
Returns
T
The element, for chaining.
Type Parameters
T
The element type.