Skip to main content

PipsPager

C# API / Fluence.Wpf.Controls

  • Assembly: Fluence.Wpf
  • Namespace: Fluence.Wpf.Controls
public class PipsPager : Control

A page indicator mirroring the WinUI 3 PipsPager: a horizontal or vertical run of round pip dots, one per visible page, with the selected pip rendered larger in the accent fill. Clicking a pip selects its page, optional previous/next chevron buttons step the selection, and arrow keys move the selection while keyboard focus is inside the pager.

Remarks: One pip per page is generated in code into the PART_PipsHost panel (the same approach as RatingControl) and the whole run is hosted in the PART_PipsScrollViewer viewport. When NumberOfPages exceeds MaxVisiblePips the viewport is clamped to MaxVisiblePips pip boxes along the orientation axis and stays put while the selection moves inside it, scrolling only far enough to bring a selection that has left the viewport back to the nearest edge. Subscribe to SelectedIndexChanged to react to selection moves from any input path.

Pips are realized eagerly rather than virtualized, so a pager is meant for the page counts a page indicator is readable at, not for thousands of pages. One WinUI behavior remains a deliberate omission: the scale-down of the pips at the viewport edges. Navigation buttons in VisibleOnPointerOver mode collapse when the pointer leaves, so the pager's desired size changes with hover.

Base type: Control (including inherited WPF and .NET members)

C# source

Constructors​

PipsPager​

public PipsPager()

Creates a new PipsPager instance.

Properties​

MaxVisiblePips​

public int MaxVisiblePips { get; set; }

Gets or sets the maximum number of pips visible at once. Every page still gets a pip; when NumberOfPages exceeds this count the pip run scrolls inside a viewport this many pips long. Values below 1 coerce to 1. Default is 5, matching WinUI.

NextButtonVisibility​

public PipsPagerButtonVisibility NextButtonVisibility { get; set; }

Gets or sets when the next-page chevron button is shown. The button is disabled while the last page is selected. Default is Collapsed, matching WinUI.

NumberOfPages​

public int NumberOfPages { get; set; }

Gets or sets the total number of pages represented by the pager. Negative values coerce to 0. Default is 0 (no pips).

Orientation​

public Orientation Orientation { get; set; }

Gets or sets whether the pips flow horizontally or vertically. The default template also swaps the navigation chevrons between left/right and up/down to match. Default is Horizontal.

PreviousButtonVisibility​

public PipsPagerButtonVisibility PreviousButtonVisibility { get; set; }

Gets or sets when the previous-page chevron button is shown. The button is disabled while the first page is selected. Default is Collapsed, matching WinUI.

SelectedPageIndex​

public int SelectedPageIndex { get; set; }

Gets or sets the zero-based index of the selected page. Values coerce into [0, NumberOfPages - 1], and to 0 while the pager has no pages. Binds two-way by default.

Methods​

OnApplyTemplate​

public override void OnApplyTemplate()

Documentation inherited from the Control API.

OnCreateAutomationPeer​

protected override AutomationPeer OnCreateAutomationPeer()

Documentation inherited from the Control API.

OnKeyDown​

protected override void OnKeyDown(KeyEventArgs e)

Documentation inherited from the Control API.

Events​

SelectedIndexChanged​

public event EventHandler<PipsPagerSelectedIndexChangedEventArgs>? SelectedIndexChanged

Occurs after SelectedPageIndex has changed from any input path (pip click, navigation buttons, arrow keys, or a programmatic set). The event args carry the previous and the new zero-based page index.

Dependency property identifiers​

Use these identifiers with WPF property APIs. The matching CLR properties appear above when the control exposes them.

MaxVisiblePipsProperty​

public static readonly DependencyProperty MaxVisiblePipsProperty

Identifies the MaxVisiblePips dependency property.

NextButtonVisibilityProperty​

public static readonly DependencyProperty NextButtonVisibilityProperty

Identifies the NextButtonVisibility dependency property.

NumberOfPagesProperty​

public static readonly DependencyProperty NumberOfPagesProperty

Identifies the NumberOfPages dependency property.

OrientationProperty​

public static readonly DependencyProperty OrientationProperty

Identifies the Orientation dependency property.

PreviousButtonVisibilityProperty​

public static readonly DependencyProperty PreviousButtonVisibilityProperty

Identifies the PreviousButtonVisibility dependency property.

SelectedPageIndexProperty​

public static readonly DependencyProperty SelectedPageIndexProperty

Identifies the SelectedPageIndex dependency property.