Skip to content

Commit

Permalink
Make DataGridCells into ContentViews instead of Grids
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Miller committed May 4, 2024
1 parent 50a0dd6 commit 791401d
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Maui.DataGrid/DataGridCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,20 @@ namespace Maui.DataGrid;
/// <summary>
/// Specifies each cell of the DataGrid.
/// </summary>
internal sealed class DataGridCell : Grid
internal sealed class DataGridCell : ContentView
{
internal DataGridCell(View cellContent, Color? backgroundColor, DataGridColumn column, bool isEditing)
{
var colorfulCellContent = new ContentView
Content = new ContentView
{
BackgroundColor = backgroundColor,
Content = cellContent,
};

Content = cellContent;
Column = column;
IsEditing = isEditing;

Children.Add(colorfulCellContent);
}

public View Content { get; }

public DataGridColumn Column { get; }

public bool IsEditing { get; }
Expand Down

0 comments on commit 791401d

Please sign in to comment.