Skip to content

Commit

Permalink
Merge pull request #119 from unoplatform/dev/sb/datagrid-text-column
Browse files Browse the repository at this point in the history
Remove Border from DataGridTextColumn content
  • Loading branch information
jeromelaban authored Dec 14, 2020
2 parents dd58588 + 496630c commit b139f9a
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/// <summary>
Expand Down Expand Up @@ -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));
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b139f9a

Please sign in to comment.