From 496630c0b9fc79af7d968d1ef6053f399ec6bb21 Mon Sep 17 00:00:00 2001 From: Steve Bilogan Date: Mon, 14 Dec 2020 10:55:34 -0500 Subject: [PATCH] fix: Remove parent Border from DataGridTextColumn --- .../DataGrid/DataGridTextColumn.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridTextColumn.cs b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridTextColumn.cs index e9a41c43c12..96e7bd9d258 100644 --- a/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridTextColumn.cs +++ b/Microsoft.Toolkit.Uwp.UI.Controls.DataGrid/DataGrid/DataGridTextColumn.cs @@ -244,8 +244,7 @@ protected override FrameworkElement GenerateElement(DataGridCell cell, object da textBlockElement.SetBinding(TextBlock.TextProperty, this.Binding); } - // UNO TODO - return new Border { Child = textBlockElement }; + return textBlockElement; } /// @@ -292,8 +291,7 @@ protected internal override void RefreshCellContent(FrameworkElement element, Br TextBox textBox = element as TextBox; if (textBox == null) { - // UNO TODO - TextBlock textBlock = (element as Border)?.Child as TextBlock; + TextBlock textBlock = element as TextBlock; if (textBlock == null) { throw DataGridError.DataGrid.ValueIsNotAnInstanceOfEitherOr("element", typeof(TextBox), typeof(TextBlock)); @@ -381,8 +379,7 @@ protected internal override void RefreshForeground(FrameworkElement element, Bru } else { - // UNO TODO - TextBlock textBlock = (element as Border)?.Child as TextBlock; + TextBlock textBlock = element as TextBlock; if (textBlock != null) { RefreshForeground(textBlock, computedRowForeground);