Repository navigation
Expand file tree
/
Copy pathPaginationExample.xaml
More file actions
142 lines (136 loc) · 8.4 KB
/
Copy pathPaginationExample.xaml
File metadata and controls
142 lines (136 loc) · 8.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<UserControl
x:Class="WPFDevelopers.Samples.ExampleViews.PaginationExample"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:WPFDevelopers.Samples.Controls"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WPFDevelopers.Samples.ExampleViews"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:wd="https://github.com/WPFDevelopersOrg/WPFDevelopers"
d:DesignHeight="450"
d:DesignWidth="800"
mc:Ignorable="d">
<controls:CodeViewer Header="{Binding NavigateMenuItem.Name}">
<TabControl TabStripPlacement="Bottom">
<TabItem Header="Event">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="30" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="正常模式分页" />
<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="精简模式分页" />
<ListBox
Grid.Row="1"
Grid.Column="0"
Margin="0,0,0,10"
ItemsSource="{Binding NormalPaginationViewModel.PaginationCollection, RelativeSource={RelativeSource AncestorType=UserControl}}" />
<ListBox
Grid.Row="1"
Grid.Column="2"
Margin="0,0,0,10"
ItemsSource="{Binding LitePaginationViewModel.PaginationCollection, RelativeSource={RelativeSource AncestorType=UserControl}}" />
<wd:Pagination
Grid.Row="2"
Grid.Column="0"
Count="{Binding NormalPaginationViewModel.Count, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}"
CountPerPage="{Binding NormalPaginationViewModel.CountPerPage, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
Current="{Binding NormalPaginationViewModel.Current, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
IsLite="False"
JumpPageClick="PaginationJumpPageClick"
NextClick="PaginationNextClick"
PageClick="PaginationPageClick"
PrevClick="PaginationPrevClick" />
<wd:Pagination
Grid.Row="2"
Grid.Column="2"
Count="{Binding LitePaginationViewModel.Count, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
CountPerPage="{Binding LitePaginationViewModel.CountPerPage, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
Current="{Binding LitePaginationViewModel.Current, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
IsLite="true"
JumpPageClick="PaginationJumpPageClick"
NextClick="PaginationNextClick"
PageClick="PaginationPageClick"
PrevClick="PaginationPrevClick"
ShowCountPerPage="False" />
</Grid>
</TabItem>
<TabItem Header="Command">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="2*" />
<ColumnDefinition Width="30" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="正常模式分页" />
<TextBlock
Grid.Column="2"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Text="精简模式分页" />
<ListBox
Grid.Row="1"
Grid.Column="0"
Margin="0,0,0,10"
ItemsSource="{Binding NormalPaginationViewModel.PaginationCollection, RelativeSource={RelativeSource AncestorType=UserControl}}" />
<ListBox
Grid.Row="1"
Grid.Column="2"
Margin="0,0,0,10"
ItemsSource="{Binding LitePaginationViewModel.PaginationCollection, RelativeSource={RelativeSource AncestorType=UserControl}}" />
<wd:Pagination
Grid.Row="2"
Grid.Column="0"
Count="{Binding NormalPaginationViewModel.Count, RelativeSource={RelativeSource AncestorType=UserControl}, Mode=TwoWay}"
CountPerPage="{Binding NormalPaginationViewModel.CountPerPage, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
Current="{Binding NormalPaginationViewModel.Current, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
IsLite="False"
JumpPageClickCommand="{Binding JumpPageClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
NextClickCommand="{Binding NextClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
PageClickCommand="{Binding PageClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
PrevClickCommand="{Binding PrevClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" />
<wd:Pagination
Grid.Row="2"
Grid.Column="2"
Count="{Binding LitePaginationViewModel.Count, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
CountPerPage="{Binding LitePaginationViewModel.CountPerPage, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
Current="{Binding LitePaginationViewModel.Current, Mode=TwoWay, RelativeSource={RelativeSource AncestorType=UserControl}}"
IsLite="true"
JumpPageClickCommand="{Binding JumpPageClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
NextClickCommand="{Binding NextClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
PageClickCommand="{Binding PageClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}"
PrevClickCommand="{Binding PrevClickCommand, RelativeSource={RelativeSource AncestorType=UserControl}}" />
</Grid>
</TabItem>
</TabControl>
<controls:CodeViewer.SourceCodes>
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/PaginationExample.xaml" CodeType="Xaml" />
<controls:SourceCodeModel CodeSource="/WPFDevelopers.SamplesCode;component/ExampleViews/PaginationExample.xaml.cs" CodeType="CSharp" />
<controls:SourceCodeModel
CodeSource="/WPFDevelopers.SamplesCode;component/ViewModels/PaginationExampleVM.cs"
CodeType="CSharp"
Haader="VM" />
</controls:CodeViewer.SourceCodes>
</controls:CodeViewer>
</UserControl>