Skip to content

Commit

Permalink
Add Initial Paginator documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
enisn committed Jun 15, 2024
1 parent 6a0f0b0 commit 8233cba
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/en/docs-nav.json
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@
"text": "DataGrid",
"path": "themes/material/components/DataGrid.md"
},
{
"text": "Paginator",
"path": "themes/material/components/Paginator.md"
},
{
"text": "TreeView",
"path": "themes/material/components/TreeView.md"
Expand Down
34 changes: 34 additions & 0 deletions docs/en/themes/material/components/Paginator.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Paginator

The paginator component is used to navigate through a list of paged items. It's not a standalone component, but a directive that can be used with other components such as DataGrid, ListView, CollectionView, etc.

## Usage

Paginator is included in the `UraniumUI.Material.Controls` namespace. To use it, add the following namespace to your XAML file:

```xml
xmlns:material="http://schemas.enisn-projects.io/dotnet/maui/uraniumui/material"
```

Then, you can use the paginator in your XAML file like this:

```xml
<material:Paginator
ChangePageCommand="{Binding SetPageCommand}"
CurrentPage="{Binding CurrentPage}"
TotalPageCount="{Binding TotalPages}"
HorizontalOptions="Center"/>
```

![Paginator](images/paginator-preview.png)


## Properties

| Property | Type | Description |
|----------|------|-------------|
| ChangePageCommand | ICommand | The command that will be executed when the page is changed. |
| CurrentPage | int | The current page number. |
| TotalPageCount | int | The total number of pages. |
| PageStepCount | int | The number of the step pages to show in the paginator. Default is 2. _(2 for previous, 2 for next)_ |

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8233cba

Please sign in to comment.