diff --git a/Maui.DataGrid/CompatibilitySuppressions.xml b/Maui.DataGrid/CompatibilitySuppressions.xml
index f80b631..5061d11 100644
--- a/Maui.DataGrid/CompatibilitySuppressions.xml
+++ b/Maui.DataGrid/CompatibilitySuppressions.xml
@@ -8,6 +8,13 @@
lib/net7.0/Maui.DataGrid.dll
true
+
+ CP0002
+ F:Maui.DataGrid.DataGrid.PaginationStepperStyleProperty
+ lib/net7.0/Maui.DataGrid.dll
+ lib/net7.0/Maui.DataGrid.dll
+ true
+
CP0002
F:Maui.DataGrid.DataGrid.RowToEditProperty
@@ -29,6 +36,13 @@
lib/net7.0/Maui.DataGrid.dll
true
+
+ CP0002
+ M:Maui.DataGrid.DataGrid.get_PaginationStepperStyle
+ lib/net7.0/Maui.DataGrid.dll
+ lib/net7.0/Maui.DataGrid.dll
+ true
+
CP0002
M:Maui.DataGrid.DataGrid.get_RowToEdit
@@ -43,6 +57,13 @@
lib/net7.0/Maui.DataGrid.dll
true
+
+ CP0002
+ M:Maui.DataGrid.DataGrid.set_PaginationStepperStyle(Microsoft.Maui.Controls.Style)
+ lib/net7.0/Maui.DataGrid.dll
+ lib/net7.0/Maui.DataGrid.dll
+ true
+
CP0002
M:Maui.DataGrid.DataGrid.set_RowToEdit(System.Object)
diff --git a/Maui.DataGrid/DataGrid.xaml b/Maui.DataGrid/DataGrid.xaml
index 9cd06d7..6a06aca 100644
--- a/Maui.DataGrid/DataGrid.xaml
+++ b/Maui.DataGrid/DataGrid.xaml
@@ -24,9 +24,11 @@
-
-
@@ -70,7 +72,7 @@
-
+
diff --git a/Maui.DataGrid/DataGrid.xaml.cs b/Maui.DataGrid/DataGrid.xaml.cs
index a7abc6f..19c605b 100644
--- a/Maui.DataGrid/DataGrid.xaml.cs
+++ b/Maui.DataGrid/DataGrid.xaml.cs
@@ -424,6 +424,20 @@ private void SortAndPaginate(SortData? sortData = null)
}
});
+ ///
+ /// Gets or sets a value indicating whether pagination is enabled in the DataGrid.
+ ///
+ public static readonly BindableProperty PaginationEnabledProperty =
+ BindablePropertyExtensions.Create(false,
+ propertyChanged: (b, o, n) =>
+ {
+ if (o != n)
+ {
+ var self = (DataGrid)b;
+ self.SortAndPaginate();
+ }
+ });
+
///
/// Gets or sets the ItemsSource for the DataGrid.
///
@@ -483,6 +497,12 @@ private void SortAndPaginate(SortData? sortData = null)
public static readonly BindableProperty PageSizeVisibleProperty =
BindablePropertyExtensions.Create(true);
+ ///
+ /// Gets or sets the list of available page sizes for the DataGrid.
+ ///
+ public static readonly BindableProperty PaginationStepperStyleProperty =
+ BindablePropertyExtensions.Create(defaultValueCreator: x => x?.Resources["DefaultPaginationStepperStyle"] as Style);
+
///
/// Gets or sets the row height for the DataGrid.
///
@@ -519,6 +539,7 @@ private void SortAndPaginate(SortData? sortData = null)
public static readonly BindableProperty FontFamilyProperty =
BindablePropertyExtensions.Create(Font.Default.Family);
+
///
/// Gets or sets the selected item in the DataGrid.
///
@@ -553,20 +574,6 @@ private void SortAndPaginate(SortData? sortData = null)
}
);
- ///
- /// Gets or sets a value indicating whether pagination is enabled in the DataGrid.
- ///
- public static readonly BindableProperty PaginationEnabledProperty =
- BindablePropertyExtensions.Create(false,
- propertyChanged: (b, o, n) =>
- {
- if (o != n)
- {
- var self = (DataGrid)b;
- self.SortAndPaginate();
- }
- });
-
///
/// Gets or sets a value indicating whether selection is enabled in the DataGrid.
///
@@ -896,6 +903,15 @@ public bool PageSizeVisible
set => SetValue(PageSizeVisibleProperty, value);
}
+ ///
+ /// Gets or sets the pagination stepper style
+ ///
+ public Style? PaginationStepperStyle
+ {
+ get => (Style?)GetValue(PaginationStepperStyleProperty);
+ set => SetValue(PaginationStepperStyleProperty, value);
+ }
+
///
/// Sets the row height
///