Vixen
02b45cc4
csharp
public sealed class Pagination

A row of page numbers.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

⚠ The row is rebuilt when the page changes, not merely restyled, because which numbers are shown depends on which one is current: page 1 of 90 shows 1 2 3 … 90 and page 45 shows 1 … 44 45 46 … 90. That is a different set of elements rather than a different highlight.

Rebuilding costs a handful of elements per page change, which is a user action. The alternative — ninety buttons with eighty of them hidden — costs them on every page that has a paginator on it.

Fields and properties (8)

  • protected override string TagName

    The element name this type answers to when a caller does not choose one.

  • protected override bool AcceptsFocus

    Whether the focus can rest on this kind of control at all.

  • public int PageCount
  • public int CurrentPage
  • public int Window
  • public static readonly UiPropertyKey PageCountProperty

    Identity for PageCount.

  • public static readonly UiPropertyKey CurrentPageProperty

    Identity for CurrentPage.

  • public static readonly UiPropertyKey WindowProperty

    Identity for Window.

Events (1)

  • public Action<Pagination, int>? PageChanged

    Raised when the page changes.

Methods (4)

  • protected override void OnCreated()

    Builds whatever this element is made of, once, as it joins a document.

  • public void ClearPageCount()

    Unsets PageCount, so it takes its default or its ancestor's value again.

  • public void ClearCurrentPage()

    Unsets CurrentPage, so it takes its default or its ancestor's value again.

  • public void ClearWindow()

    Unsets Window, so it takes its default or its ancestor's value again.

Used by (3)

  • ShellHelloUi
  • NavigationInteractionTestsVixen.Ui.Controls.Tests
  • SelectionTestsVixen.Ui.Controls.Tests