ScrollChangedEventArgs
Namespace: Hex1b.Events
Assembly: Hex1b.dll
Event arguments for scroll position changes. Provides information about the current scroll state when scrolling occurs.
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:
widget(ScrollPanelWidget):node(ScrollPanelNode):context(InputBindingActionContext):offset(Int32):previousOffset(Int32):contentSize(Int32):viewportSize(Int32):
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
public int ContentSize { get; }IsAtEnd
Whether the scroll position is at the end (offset equals max offset).
Returns: Boolean
public bool IsAtEnd { get; }IsAtStart
Whether the scroll position is at the start (offset is 0).
Returns: Boolean
public bool IsAtStart { get; }IsScrollable
Whether the content is scrollable (content exceeds viewport).
Returns: Boolean
public bool IsScrollable { get; }MaxOffset
The maximum scroll offset.
Returns: Int32
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
public int Offset { get; }PreviousOffset
The previous scroll offset before this change.
Returns: Int32
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
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
public int ViewportSize { get; }