Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

New Post: DataGrid - Changing the GroupHeaderControl Background Color based on its value

$
0
0
I am trying the change the background color for the GroupHeaderControl. I am able the set the background color but I need to change the color based on its value.

Ex) Element1 --> Element2 --> Element3
I need to set the backgroundcolor as green if the text has Element2 in it?
Is it possible to change it?
<Style TargetType="{x:Type xcdg:GroupHeaderControl}">
<Setter Property="Template">
    <Setter.Value>
      <ControlTemplate TargetType="{x:Type xcdg:GroupHeaderControl}">
        <Border Background="Orange" BorderThickness="2">
          <StackPanel Orientation="Horizontal">
            <ContentPresenter/>
          </StackPanel>
        </Border>
      </ControlTemplate>
    </Setter.Value>
  </Setter>
</Style>

Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>