Skip to content

ScrollChangedEventArgs ​

Namespace: Hex1b.Events

Assembly: Hex1b.dll

Event arguments for scroll position changes. Provides information about the current scroll state when scrolling occurs.

csharp
public sealed class ScrollChangedEventArgs : WidgetEventArgs<ScrollPanelWidget, ScrollPanelNode>

Inheritance ​

Object → WidgetEventArgs → WidgetEventArgs<ScrollPanelWidget, ScrollPanelNode> → ScrollChangedEventArgs

Constructors ​

ScrollChangedEventArgs(ScrollPanelWidget, ScrollPanelNode, InputBindingActionContext, int, int, int, int) ​

Creates a new ScrollChangedEventArgs.

Parameters:

csharp
public ScrollChangedEventArgs(ScrollPanelWidget widget, ScrollPanelNode node, InputBindingActionContext context, int offset, int previousOffset, int contentSize, int viewportSize)

Properties ​

ContentSize ​

The size of the content being scrolled (in characters). For vertical scrolling, this is the total content height. For horizontal scrolling, this is the total content width.

Returns: Int32

csharp
public int ContentSize { get; }

IsAtEnd ​

Whether the scroll position is at the end (offset equals max offset).

Returns: Boolean

csharp
public bool IsAtEnd { get; }

IsAtStart ​

Whether the scroll position is at the start (offset is 0).

Returns: Boolean

csharp
public bool IsAtStart { get; }

IsScrollable ​

Whether the content is scrollable (content exceeds viewport).

Returns: Boolean

csharp
public bool IsScrollable { get; }

MaxOffset ​

The maximum scroll offset.

Returns: Int32

csharp
public int MaxOffset { get; }

Offset ​

The current scroll offset (in characters). For vertical scrolling, this is the row offset. For horizontal scrolling, this is the column offset.

Returns: Int32

csharp
public int Offset { get; }

PreviousOffset ​

The previous scroll offset before this change.

Returns: Int32

csharp
public int PreviousOffset { get; }

Progress ​

The scroll progress as a value between 0 and 1. Returns 0 when at the start, 1 when at the end.

Returns: Double

csharp
public double Progress { get; }

ViewportSize ​

The size of the visible viewport (in characters). For vertical scrolling, this is the viewport height. For horizontal scrolling, this is the viewport width.

Returns: Int32

csharp
public int ViewportSize { get; }

Released under the MIT License.