Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    IScrollAnchorInfo Interface

    Namespace: Stride.UI
    Assembly: 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.

    | Improve this Doc View Source

    Properties


    ScrollOwner

    Gets or sets a ScrollViewer element that controls scrolling behavior.

    ScrollViewer ScrollOwner { get; set; }
    Property Value
    Type Description
    ScrollViewer
    | Improve this Doc View Source

    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

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article
    In This Article
    • Properties
      • ScrollOwner
    • Methods
      • GetSurroudingAnchorDistances(Orientation, Single)
      • ShouldAnchor(Orientation)
    • Extension Methods

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation