Home Forums WPF controls Xceed DataGrid for WPF Style Question

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • User (Old forums)
    Post count: 23064
    #24326 |

    Incase nobody’s been able to tell I’m just kinda playing with the grid today trying to get a good grip on the way everything is handled.

    I took some code from one of the snippets posted earlier

    <Style TargetType=”{x:Type xcdg:DataRow}”>
    <Setter Property=”SelectionBackground”>
    <SolidColorBrush Color=”Yellow”/>
    <Setter Property=”SelectionForeground “>
    <SolidColorBrush Color=”Orange”/>

    I’ve added this to my UserControl.Resources section and I have a DataGridControl in the UserControl. Am I wrong or should the normal fields of the DataGrid show up as Orange and Yellow?

    I’m also using the following custom content templates
    <DataTemplate x:Key=”TimeCellContentTemplate”>
    <TextBlock Text=”{Binding Converter={StaticResource DateTimeToShortTimeConverter}}” TextAlignment=”Right”/>

    <DataTemplate x:Key=”ViewImage”>
    <Image Source=”ZoomHS.png” IsHitTestVisible=”False”/>

    <DataTemplate x:Key=”DateCellContentTemplate”>
    <TextBlock Text=”{Binding Converter={StaticResource DateTimeToDateConverter}}”/>

    Is this the problem? How would I change the templates to use the style?

    Imported from legacy forums. Posted by Duane (had 566 views)

    Xceed Support
    Post count: 5658

    This seems to be a “by-design” issue with the default Aero theme . Your code seems fine and the “normal” cells should receive the selection colors, and the custom cells as well.

    For the moment, you will need to change the theme by setting the grid’s View property.


    Imported from legacy forums. Posted by Jenny [Xceed] (had 2740 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.