Table of Contents

Method RaiseScroll

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

RaiseScroll(AbstractControl, ScrollBarOrientation, ScrollEventType, int, int)

Raises a scroll event for the specified control with the given orientation, event type, and value changes.

public virtual void RaiseScroll(AbstractControl sender, ScrollBarOrientation orientation, ScrollEventType evType, int oldValue = 0, int newValue = 0)

Parameters

sender AbstractControl

The control that is the source of the scroll event.

orientation ScrollBarOrientation

The orientation of the scroll bar associated with the event.

evType ScrollEventType

The type of scroll event that occurred.

oldValue int

The previous value of the scroll position. Defaults to 0.

newValue int

The new value of the scroll position. Defaults to 0.

Remarks

If the event is not marked as handled and the SendScrollToControl property is set to true, the scroll event is propagated to the sender control. This method is typically used to notify controls of scroll actions and to allow for custom handling or propagation of scroll events.

RaiseScroll(AbstractControl, PointD?)

Raises a scroll event based on the movement from the initial mouse down location to the specified touch location or the current mouse position.

public virtual void RaiseScroll(AbstractControl sender, PointD? touchLocation)

Parameters

sender AbstractControl

The control that is the source of the scroll event.

touchLocation PointD?

The location of the touch or pointer, in device-independent coordinates. If null, the current mouse position is used.

Remarks

This method determines the scroll direction and magnitude based on the distance and direction between the initial mouse down location and the current pointer or touch location. If the movement does not exceed the minimum scroll distance, no scroll event is raised.