diff --git a/Maui.DataGrid/DataGrid.xaml.cs b/Maui.DataGrid/DataGrid.xaml.cs index 232d58e..456d73c 100644 --- a/Maui.DataGrid/DataGrid.xaml.cs +++ b/Maui.DataGrid/DataGrid.xaml.cs @@ -647,7 +647,14 @@ public partial class DataGrid { foreach (var column in self.Columns) { - column.SortingIcon.Style = n; + if (n is null) + { + column.SortingIcon.Style = self.DefaultSortIconStyle; + } + else + { + column.SortingIcon.Style = n; + } } } }); diff --git a/Maui.DataGrid/DataGridColumn.cs b/Maui.DataGrid/DataGridColumn.cs index 2fbcd91..492763f 100644 --- a/Maui.DataGrid/DataGridColumn.cs +++ b/Maui.DataGrid/DataGridColumn.cs @@ -167,7 +167,17 @@ public sealed class DataGridColumn : BindableObject, IDefinition { if (b is DataGridColumn self && self.HeaderLabel != null) { - self.HeaderLabel.Style = n; + if (n is null) + { + if (self.DataGrid is not null) + { + self.HeaderLabel.Style = self.DataGrid.DefaultHeaderLabelStyle; + } + } + else + { + self.HeaderLabel.Style = n; + } } }); @@ -180,7 +190,17 @@ public sealed class DataGridColumn : BindableObject, IDefinition { if (b is DataGridColumn self) { - self.FilterTextbox.Style = n; + if (n is null) + { + if (self.DataGrid is not null) + { + self.FilterTextbox.Style = self.DataGrid.DefaultHeaderFilterStyle; + } + } + else + { + self.FilterTextbox.Style = n; + } } });