30 lines
1.2 KiB
XML
30 lines
1.2 KiB
XML
<UserControl
|
|
x:Class="Ursa.Demo.Pages.PaginationDemo"
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:u="https://irihi.tech/ursa"
|
|
xmlns:viewModels="clr-namespace:Ursa.Demo.ViewModels"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<Design.DataContext>
|
|
<viewModels:PaginationDemoViewModel />
|
|
</Design.DataContext>
|
|
<StackPanel>
|
|
<StackPanel Orientation="Horizontal">
|
|
<TextBlock Text="Current Page: "></TextBlock>
|
|
<TextBlock Text="{Binding #page.CurrentPage}" />
|
|
</StackPanel>
|
|
<ToggleSwitch Name="pageSizeSelector" Content="Show Page Size Selector" />
|
|
<ToggleSwitch Name="quickJumperSelector" Content="Show Quick Jumper"></ToggleSwitch>
|
|
<u:Pagination
|
|
Name="page"
|
|
PageSizeOptions="10, 20, 50, 100"
|
|
ShowQuickJump="{Binding #quickJumperSelector.IsChecked}"
|
|
ShowPageSizeSelector="{Binding #pageSizeSelector.IsChecked}"
|
|
TotalCount="600" />
|
|
</StackPanel>
|
|
</UserControl>
|