Class MudPagination
- Namespace
- MudBlazor
- Assembly
- MudBlazor.dll
A list of clickable page numbers along with navigation buttons.
public class MudPagination : MudComponentBase, IComponent, IHandleEvent, IHandleAfterRender, IMudStateHasChanged
- Inheritance
-
MudPagination
- Implements
- Inherited Members
- Extension Methods
Constructors
MudPagination()
public MudPagination()
Properties
BeforeIcon
The icon for the Before button.
[Parameter]
[Category("Appearance")]
public string BeforeIcon { get; set; }
Property Value
Remarks
Defaults to NavigateBefore. Only shows if ShowPreviousButton is true
.
BoundaryCount
The number of pages shown before and after the ellipsis.
[Parameter]
[Category("Appearance")]
public int BoundaryCount { get; set; }
Property Value
Remarks
Defaults to 1
.
A value of 1
would show one-page number at the edge: < 1 ... 4 5 6 ... 9 >
A value of 2
would show two-page numbers at the edge: < 1 2 ... 4 5 6 ... 8 9 >
Color
The color of the selected page button.
[Parameter]
[Category("Appearance")]
public Color Color { get; set; }
Property Value
Remarks
Defaults to Primary.
ControlButtonClicked
Occurs when the First, Previous, Next, or Last button is clicked.
[Parameter]
public EventCallback<Page> ControlButtonClicked { get; set; }
Property Value
Count
The total number of pages.
[Parameter]
[Category("Behavior")]
public int Count { get; set; }
Property Value
Disabled
Prevents the user from clicking page buttons.
[Parameter]
[Category("Behavior")]
public bool Disabled { get; set; }
Property Value
Remarks
Defaults to false
.
DropShadow
Shows a drop shadow under each page button.
[Parameter]
[Category("Appearance")]
public bool DropShadow { get; set; }
Property Value
Remarks
Defaults to true
.
FirstIcon
The icon for the First button.
[Parameter]
[Category("Appearance")]
public string FirstIcon { get; set; }
Property Value
Remarks
Defaults to FirstPage. Only shows if ShowFirstButton is true
.
LastIcon
The icon for the Last button.
[Parameter]
[Category("Appearance")]
public string LastIcon { get; set; }
Property Value
Remarks
Defaults to LastPage. Only shows if ShowLastButton is true
.
MiddleCount
The number of pages shown between the ellipsis.
[Parameter]
[Category("Appearance")]
public int MiddleCount { get; set; }
Property Value
Remarks
Defaults to 1
.
A value of 1
would show one-page number in the middle: < 1 ... 5 ... 9 >
A value of 3
would show three-page numbers in the middle: < 1 ... 4 5 6 ... 9 >
NextIcon
The icon for the Next button.
[Parameter]
[Category("Appearance")]
public string NextIcon { get; set; }
Property Value
Remarks
Defaults to NavigateNext. Only shows if ShowNextButton is true
.
Rectangular
Shows rectangular-shaped page buttons.
[Parameter]
[Category("Appearance")]
public bool Rectangular { get; set; }
Property Value
Remarks
Defaults to false
.
RightToLeft
Displays text right-to-left.
[CascadingParameter(Name = "RightToLeft")]
public bool RightToLeft { get; set; }
Property Value
Remarks
Defaults to false
. Controlled via the MudRTLProvider.
Selected
The selected page number.
[Parameter]
[Category("Behavior")]
public int Selected { get; set; }
Property Value
SelectedChanged
Occurs when Selected has changed.
[Parameter]
public EventCallback<int> SelectedChanged { get; set; }
Property Value
ShowFirstButton
Shows the button which selects the first page.
[Parameter]
[Category("Behavior")]
public bool ShowFirstButton { get; set; }
Property Value
Remarks
Defaults to false
.
ShowLastButton
Shows the button which selects the last page.
[Parameter]
[Category("Behavior")]
public bool ShowLastButton { get; set; }
Property Value
Remarks
Defaults to false
.
ShowNextButton
Shows the button which selects the next page.
[Parameter]
[Category("Behavior")]
public bool ShowNextButton { get; set; }
Property Value
Remarks
Defaults to true
.
ShowPageButtons
Shows numeric buttons for pages.
[Parameter]
[Category("Behavior")]
public bool ShowPageButtons { get; set; }
Property Value
ShowPreviousButton
Shows the button which selects the previous page.
[Parameter]
[Category("Behavior")]
public bool ShowPreviousButton { get; set; }
Property Value
Remarks
Defaults to true
.
Size
The size of the page buttons.
[Parameter]
[Category("Appearance")]
public Size Size { get; set; }
Property Value
Remarks
Defaults to Medium.
Variant
The display variant to use.
[Parameter]
[Category("Appearance")]
public Variant Variant { get; set; }
Property Value
Remarks
Defaults to Text.
Methods
BuildRenderTree(RenderTreeBuilder)
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
__builder
RenderTreeBuilder
NavigateToAsync(Page)
Changes the currently selected page.
public Task NavigateToAsync(Page page)
Parameters
page
PageThe page to navigate to.
Returns
NavigateToAsync(int)
Changes the currently selected page.
public Task NavigateToAsync(int pageIndex)
Parameters
pageIndex
intThe index of the page to select, where the first page is
0
.