Skip to content
ConsoleMonster
Class

WidgetPager

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
static

Pages a reading view through the existing console input and prompt surface lifecycle.

Inheritance

  • object
  • WidgetPager

Methods

public static bool TryShow(IWidget content, string? title = null, InteractiveOptions? options = null, CancellationToken cancellationToken = default, int? contentWidth = null) #

Shows a pager only when rich interaction is available and the content exceeds the screen height. Returns false without acquiring input or emitting output when the caller should print the complete view statically.

Parameters

content ConsoleMonster.Layout.IWidget required
The document or other reading widget.
title string? = null optional
The pager title, shown literally; null uses the default document label.
options ConsoleMonster.Interactive.InteractiveOptions? = null optional
Input, screen capture, profile and theme; null uses the shared defaults.
cancellationToken System.Threading.CancellationToken = default optional
Cancels the interaction.
contentWidth int? = null optional
An optional maximum document width, retained when the physical surface resizes.

Returns

bool True if a pager ran, including when the reader quit; false if static output is appropriate.