menu

MAUI

  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class AutoScroller - MAUI API Reference | Syncfusion

    Show / Hide Table of Contents

    Class AutoScroller

    Manages auto-scroll functionality for the SfTreeView control during drag-and-drop operations.

    Inheritance
    System.Object
    AutoScroller
    Namespace: Syncfusion.Maui.TreeView
    Assembly: Syncfusion.Maui.TreeView.dll
    Syntax
    public class AutoScroller : Object
    Remarks

    The AutoScroller class is responsible for automatically scrolling the SfTreeView control. when a dragged item approaches the edge of the visible viewport during drag-and-drop interactions. This ensures smooth and continuous scrolling to facilitate drag-and-drop operations, enhancing the user experience.

    Constructors

    AutoScroller(SfTreeView)

    Initializes a new instance of the AutoScroller class.

    Declaration
    public AutoScroller(SfTreeView treeView)
    Parameters
    Type Name Description
    SfTreeView treeView

    denotes the instance of SfTreeView.

    Properties

    AllowOutsideScroll

    Gets or sets a value indicating whether to enable auto-scrolling when a dragged item is outside the top or bottom bounds of the SfTreeView.

    Declaration
    public bool AllowOutsideScroll { get; set; }
    Property Value
    Type
    System.Boolean
    Remarks

    When enabled, auto-scrolling occurs when a dragged item is beyond the visible top or bottom region of the SfTreeView.

    Examples
    Enable auto-scrolling when dragged items are outside the top and bottom bounds.
    this.treeView.AutoScroller.AllowOutsideScroll = true;

    Interval

    Gets or sets the interval at which the SfTreeView automatically scrolls while an item is being dragged.

    Declaration
    public TimeSpan Interval { get; set; }
    Property Value
    Type
    System.TimeSpan
    Remarks

    Specifies the time interval between consecutive auto-scrolling actions when an item is being dragged within the SfTreeView. The default interval is 200 milliseconds.

    Examples
    Set the auto-scrolling interval to 200 milliseconds.
    this.treeView.AutoScroller.ScrollInterval = TimeSpan.FromMilliseconds(200);

    ScrollMargin

    Gets or sets a value indicating the margin within which auto-scrolling is triggered when dragged items approach the top or bottom bounds of the SfTreeView.

    Declaration
    public double ScrollMargin { get; set; }
    Property Value
    Type
    System.Double
    Remarks

    When a dragged item approaches the top or bottom edge of the visible viewport during a drag-and-drop operation, auto-scrolling is triggered if the item is within the specified margin from the top or bottom bounds.

    Examples
    Set the scroll margin to 20 units.
    this.treeView.AutoScroller.ScrollMargin = 20;
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved