DaisyPaginationItem

Overview

A button control representing a single page in a DaisyPagination control. This is a helper class created automatically by the parent pagination control.

DaisyPaginationItem extends Button and adds pagination-specific properties like PageNumber and IsEllipsis. Items are auto-generated by DaisyPagination based on the TotalPages property - manual creation is not typically needed.

Properties

Property Type Default Description
PageNumber int? null The page number this item represents. Null for navigation buttons (prev/next, first/last, jump) and ellipsis.
IsEllipsis bool false Whether this item is an ellipsis placeholder. Ellipsis items are disabled and non-clickable.

How It Works

DaisyPaginationItem is used internally by DaisyPagination to represent:
Type PageNumber IsEllipsis Content
Page button 1, 2, etc. false Page number text
Ellipsis null true "…" (customizable)
Prev/Next button null false Chevron icon
First/Last button null false Page first/last icon
Jump button null false Double chevron icon

Usage

Automatic (Recommended)

Items are created automatically by DaisyPagination:

<!-- This generates all page buttons automatically -->
<controls:DaisyPagination TotalPages="100"
                          CurrentPage="50"
                          MaxVisiblePages="7" />

The control automatically:

Internal Generation

The pagination control creates items like this internally:

// Page button
var pageButton = new DaisyPaginationItem
{
    Content = "5",
    PageNumber = 5,
    IsEllipsis = false
};

// Ellipsis
var ellipsis = new DaisyPaginationItem
{
    Content = "…",
    PageNumber = null,
    IsEllipsis = true,
    IsEnabled = false
};

// Navigation button (with icon)
var prevButton = new DaisyPaginationItem
{
    PageNumber = null,
    IsEllipsis = false,
    Content = CreateNavIcon("DaisyIconChevronLeft")
};

Styling

See Also