IScrollAnchorInfo Interface
Namespace: Stride.UIAssembly: Stride.UI.dll
Interface providing anchor information to its ScrollViewer.
public interface IScrollAnchorInfo
Name | Description | |
---|---|---|
Properties | ||
ScrollOwner | Gets or sets a ScrollViewer element that controls scrolling behavior. |
|
Methods | ||
GetSurroudingAnchorDistances(Orientation, Single) | Get the distances to the previous and next anchors in the provided direction and from given position. |
|
ShouldAnchor(Orientation) | Indicate whether the ScrollViewer managing this element should snap scrolling to anchors in the provided direction. |
Properties
ScrollOwner
Gets or sets a ScrollViewer element that controls scrolling behavior.
ScrollViewer ScrollOwner { get; set; }
Property Value
Type | Description |
---|---|
ScrollViewer |
Methods
GetSurroudingAnchorDistances(Orientation, Single)
Get the distances to the previous and next anchors in the provided direction and from given position.
Vector2 GetSurroudingAnchorDistances(Orientation direction, float position)
Parameters
Type | Name | Description |
---|---|---|
Orientation | direction | The direction in which to anchor |
System.Single | position | The current scrolling position |
Returns
Type | Description |
---|---|
Vector2 | The distances to previous and next anchors from to current scroll position |
Remarks
The distance contained in the X component of the returned vector is inferior or equal to 0 and the distance contained in the Y component is superior or equal to 0.
ShouldAnchor(Orientation)
Indicate whether the ScrollViewer managing this element should snap scrolling to anchors in the provided direction.
bool ShouldAnchor(Orientation direction)
Parameters
Type | Name | Description |
---|---|---|
Orientation | direction | The direction in which to anchor |
Returns
Type | Description |
---|---|
System.Boolean |