mui icon indicating copy to clipboard operation
mui copied to clipboard

DataGridCell Theme Overidden

Open ChristopherLouw opened this issue 7 years ago • 1 comments

I have a datagrid and certain cell's text need to have a different colour based on their content. The problem is that I have, is that all I want to do is change the foreground colour (which works) but instead the entire formatting for that specific cell is altered, font, style background etc.

image

untitled

The style is completely different from the other cells, only the colour should be different.

Please assist.

ChristopherLouw avatar Nov 18 '16 10:11 ChristopherLouw

I haven't tried this, just typing what I'm seeing from your comment.

BasedOn="{StaticResource {x:Type DataGridCell}}"

<mui:DataGridTextColumn ... >
  <DataGridTextColumn.CellStyle>
    <Style TargetType="{x:Type DataGridCell}" BasedOn="{StaticResource {x:Type DataGridCell}}" >
      <Setter ... >

wdcossey avatar Dec 21 '16 08:12 wdcossey