From f47f71c08da60c2294eb5467f42b47d6ac6563a8 Mon Sep 17 00:00:00 2001 From: Max Katz Date: Fri, 14 Oct 2022 03:41:06 -0400 Subject: [PATCH] Remove AlternatingRowBackground from the API --- .../ControlCatalog/Pages/DataGridPage.xaml | 3 +-- src/Avalonia.Controls.DataGrid/DataGrid.cs | 25 +++---------------- .../Themes/Fluent.xaml | 7 +----- .../Themes/Simple.xaml | 5 ---- 4 files changed, 6 insertions(+), 34 deletions(-) diff --git a/samples/ControlCatalog/Pages/DataGridPage.xaml b/samples/ControlCatalog/Pages/DataGridPage.xaml index 27272a9ff7..bc8252a3a4 100644 --- a/samples/ControlCatalog/Pages/DataGridPage.xaml +++ b/samples/ControlCatalog/Pages/DataGridPage.xaml @@ -45,8 +45,7 @@ + RowBackground="#1000"> diff --git a/src/Avalonia.Controls.DataGrid/DataGrid.cs b/src/Avalonia.Controls.DataGrid/DataGrid.cs index c6cc9bf278..c23bca1810 100644 --- a/src/Avalonia.Controls.DataGrid/DataGrid.cs +++ b/src/Avalonia.Controls.DataGrid/DataGrid.cs @@ -246,23 +246,6 @@ namespace Avalonia.Controls set { SetValue(ColumnWidthProperty, value); } } - public static readonly StyledProperty AlternatingRowBackgroundProperty = - AvaloniaProperty.Register(nameof(AlternatingRowBackground)); - - /// - /// Gets or sets the that is used to paint the background of odd-numbered rows. - /// - /// - /// The brush that is used to paint the background of odd-numbered rows. The default is a - /// with a - /// value of white (ARGB value #00FFFFFF). - /// - public IBrush AlternatingRowBackground - { - get { return GetValue(AlternatingRowBackgroundProperty); } - set { SetValue(AlternatingRowBackgroundProperty, value); } - } - public static readonly StyledProperty FrozenColumnCountProperty = AvaloniaProperty.Register( nameof(FrozenColumnCount), @@ -2058,7 +2041,7 @@ namespace Avalonia.Controls forceHorizontalScroll: true); } } - + protected override void OnAttachedToVisualTree(VisualTreeAttachmentEventArgs e) { base.OnAttachedToVisualTree(e); @@ -2167,7 +2150,7 @@ namespace Avalonia.Controls return desiredSize; } - + /// protected override void OnDataContextBeginUpdate() { @@ -2183,7 +2166,7 @@ namespace Avalonia.Controls NotifyDataContextPropertyForAllRowCells(GetAllRows(), false); } - + /// /// Raises the BeginningEdit event. /// @@ -4575,7 +4558,7 @@ namespace Avalonia.Controls dataGridCell.Content = element; } - + } private void PreparingCellForEditPrivate(Control editingElement) diff --git a/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml b/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml index b4bae02b9b..3019e3d158 100644 --- a/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml +++ b/src/Avalonia.Controls.DataGrid/Themes/Fluent.xaml @@ -232,7 +232,7 @@ - + @@ -337,10 +337,6 @@ - - -