Table of Contents

Class MBPaginator

Namespace
Material.Blazor
Assembly
Material.Blazor.dll
public class MBPaginator : ComponentFoundation, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Inheritance
MBPaginator
Implements
Inherited Members

Constructors

MBPaginator()

public MBPaginator()

Properties

CultureInfo

The CultureInfo that determines the culture-specific format for dates according to the DateFormat.

[Parameter]
public CultureInfo CultureInfo { get; set; }

Property Value

CultureInfo

ItemCount

The total number if items being paged.

[Parameter]
public int ItemCount { get; set; }

Property Value

int

ItemsPerPage

The number of items per page as selected by the user.

[Parameter]
public int ItemsPerPage { get; set; }

Property Value

int

ItemsPerPageChanged

Two way binding callback for ItemsPerPage

[Parameter]
public EventCallback<int> ItemsPerPageChanged { get; set; }

Property Value

EventCallback<int>

ItemsPerPageFormatter

A function delegate that formats the items per page text in the language of your choice. The two parameters are number of items per page and the applicable culture respectively. When neither set nor overrided by cascading defaults, DefaultItemsPerPageFormatter(int, CultureInfo) is used.

[Parameter]
public Func<int, CultureInfo, string> ItemsPerPageFormatter { get; set; }

Property Value

Func<int, CultureInfo, string>

ItemsPerPageSelection

A list of the allowable number of items per page for the paginator to present to the user.

[Parameter]
public IEnumerable<int> ItemsPerPageSelection { get; set; }

Property Value

IEnumerable<int>

PageNumber

The current page number selected by the user.

[Parameter]
public int PageNumber { get; set; }

Property Value

int

PageNumberChanged

Two way binding callback for PageNumber

[Parameter]
public EventCallback<int> PageNumberChanged { get; set; }

Property Value

EventCallback<int>

PositionFormatter

A function delegate that formats the position text in the language of your choice. The four parameters are the first item number, the last item number, the total item count and the applicable culture respectively. When neither set nor overrided by cascading defaults, DefaultPositionFormatter(int, int, int, CultureInfo) is used.

[Parameter]
public Func<int, int, int, CultureInfo, string> PositionFormatter { get; set; }

Property Value

Func<int, int, int, CultureInfo, string>

Methods

BuildRenderTree(RenderTreeBuilder)

Renders the component to the supplied RenderTreeBuilder.

protected override void BuildRenderTree(RenderTreeBuilder __builder)

Parameters

__builder RenderTreeBuilder

DefaultItemsPerPageFormatter(int, CultureInfo)

public static string DefaultItemsPerPageFormatter(int itemsPerPage, CultureInfo cultureInfo)

Parameters

itemsPerPage int
cultureInfo CultureInfo

Returns

string

DefaultPositionFormatter(int, int, int, CultureInfo)

public static string DefaultPositionFormatter(int firstItemNumber, int lastItemNumber, int itemCount, CultureInfo cultureInfo)

Parameters

firstItemNumber int
lastItemNumber int
itemCount int
cultureInfo CultureInfo

Returns

string

OnAfterRenderAsync(bool)

Material.Blazor components generally should not override this because it handles the case where components need to be adjusted when inside an MBDialog or MBCard.

protected override Task OnAfterRenderAsync(bool firstRender)

Parameters

firstRender bool

Returns

Task

OnInitializedAsync()

Method invoked when the component is ready to start, having received its initial parameters from its parent in the render tree.

Override this method if you will perform an asynchronous operation and want the component to refresh when that operation is completed.

protected override Task OnInitializedAsync()

Returns

Task

A Task representing any asynchronous operation.

OnParametersSetAsync()

When overriding this, call await base.OnParametersSetAsync(); before any user code unless there is a very good reason not to.

protected override Task OnParametersSetAsync()

Returns

Task