Class MBPaginator
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
ItemCount
The total number if items being paged.
[Parameter]
public int ItemCount { get; set; }
Property Value
ItemsPerPage
The number of items per page as selected by the user.
[Parameter]
public int ItemsPerPage { get; set; }
Property Value
ItemsPerPageChanged
Two way binding callback for ItemsPerPage
[Parameter]
public EventCallback<int> ItemsPerPageChanged { get; set; }
Property Value
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
PageNumber
The current page number selected by the user.
[Parameter]
public int PageNumber { get; set; }
Property Value
PageNumberChanged
Two way binding callback for PageNumber
[Parameter]
public EventCallback<int> PageNumberChanged { get; set; }
Property Value
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
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
intcultureInfo
CultureInfo
Returns
DefaultPositionFormatter(int, int, int, CultureInfo)
public static string DefaultPositionFormatter(int firstItemNumber, int lastItemNumber, int itemCount, CultureInfo cultureInfo)
Parameters
firstItemNumber
intlastItemNumber
intitemCount
intcultureInfo
CultureInfo
Returns
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
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
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()