Class AutoScroller
Provides automatic scrolling of content when the user drags the pressed mouse to an edge of the control.
Namespace: Syncfusion.Windows.Controls.Scroll
Assembly: Syncfusion.GridCommon.WPF.dll
Syntax
public class AutoScroller : Object
Constructors
AutoScroller(IScrollBarProvider)
Initializes a new instance of the AutoScroller class.
Declaration
public AutoScroller(IScrollBarProvider scrollControl)
Parameters
Type | Name | Description |
---|---|---|
IScrollBarProvider | scrollControl | The scroll control. |
Properties
AllowScrollOutsideBounds
Gets or sets a value indicating whether the parent control should scroll when the user drags the mouse outside the parent controls client area.
Declaration
public bool AllowScrollOutsideBounds { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
AutoScrollBounds
Gets or sets the outer scrolling area. Typically the client area of the control.
Declaration
public Rect AutoScrollBounds { get; set; }
Property Value
Type |
---|
System.Windows.Rect |
AutoScrolling
Disables or specifies the direction for automatic scrolling when the user drags the mouse cursor out of the scrolling area.
Declaration
public AutoScrollOrientation AutoScrolling { get; set; }
Property Value
Type |
---|
AutoScrollOrientation |
Enabled
Gets or sets a value indicating whether this AutoScroller is enabled.
Declaration
public bool Enabled { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
HScrollBar
Gets the state describing for the horizontal scroll bar.
Declaration
public IScrollBar HScrollBar { get; }
Property Value
Type | Description |
---|---|
IScrollBar | The horizontal scroll bar state. |
InMouseDragScroll
Gets a value indicating whether a scroll operation is triggered by this object
Declaration
public bool InMouseDragScroll { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
InsideScrollBounds
Gets the inside scrolling area. The control will scroll if the user drags the mouse outside this area.
Declaration
public virtual Rect InsideScrollBounds { get; }
Property Value
Type |
---|
System.Windows.Rect |
InsideScrollMargins
Gets or sets the default margins for the scrolling area when the user moves the mouse to the margin between InsideScrollBounds and AutoScrollBounds.
Declaration
public Size InsideScrollMargins { get; set; }
Property Value
Type |
---|
System.Windows.Size |
IntervalTime
sets the timer interval for auto scrolling.
Declaration
public TimeSpan IntervalTime { get; set; }
Property Value
Type |
---|
System.TimeSpan |
VScrollBar
Gets the state describing for the vertical scroll bar.
Declaration
public IScrollBar VScrollBar { get; }
Property Value
Type | Description |
---|---|
IScrollBar | The vertical scroll bar state. |
Methods
add_AutoScrollerValueChanged(AutoScroller.AutoScrollerValueChangedEventHandler)
Declaration
public void add_AutoScrollerValueChanged(AutoScroller.AutoScrollerValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
AutoScroller.AutoScrollerValueChangedEventHandler | value |
CheckAutoScroll(Point)
Declaration
protected virtual void CheckAutoScroll(Point mousePoint)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Point | mousePoint |
OnAutoScrollingChanged(EventArgs)
Raises the AutoScrollingChanged event.
Declaration
protected virtual void OnAutoScrollingChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e | An System.EventArgs that contains the event data. |
RaiseAutoScrollerValueChanged(Boolean, Boolean, Boolean, Boolean)
Declaration
protected virtual void RaiseAutoScrollerValueChanged(bool isLineUp, bool isLineDown, bool isLineLeft, bool isLineRight)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isLineUp | |
System.Boolean | isLineDown | |
System.Boolean | isLineLeft | |
System.Boolean | isLineRight |
remove_AutoScrollerValueChanged(AutoScroller.AutoScrollerValueChangedEventHandler)
Declaration
public void remove_AutoScrollerValueChanged(AutoScroller.AutoScrollerValueChangedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
AutoScroller.AutoScrollerValueChangedEventHandler | value |
ResetInsideScrollMargins()
Resets the InsideScrollMargins property to its default value.
Declaration
public void ResetInsideScrollMargins()
Events
AutoScrollerValueChanged
Declaration
public event AutoScroller.AutoScrollerValueChangedEventHandler AutoScrollerValueChanged
Event Type
Type |
---|
AutoScroller.AutoScrollerValueChangedEventHandler |
AutoScrollingChanged
Occurs when the AutoScrolling property is changed.
Declaration
public event EventHandler AutoScrollingChanged
Event Type
Type |
---|
System.EventHandler |
Remarks
If you want to prevent autoscrolling, you should handle this event and reset the AutoScrolling property to ScrollBars.None.