This is a migrated thread and some comments may be shown as answers.

How Change Background Color selection

3 Answers 313 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Enrico
Top achievements
Rank 1
Enrico asked on 01 Jul 2013, 10:05 AM

Hi,

My WPF GridView use background color for give some information to user:

-          Green, row completed

-          Orange, row to be process

-          Yellow, row work in progress (WIP)

 

Actual color selection in grid is yellow. How I can change color selection?

 

Actualy, I use this RowStyle for change background color.

 

            <controls:RadGridView.RowStyle>

                <Style TargetType="gridView:GridViewRow">

                    <Setter Property="Background" Value="{Binding Color}"></Setter>

                </Style>

            </controls:RadGridView.RowStyle>           

 

I try with Style.Trigger for IsMouseOver and IsSelected, but the rectangle of selection is always yellow.

I read in your forum that it’s possible override default style.

Can you send me an example in C#?

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 01 Jul 2013, 10:24 AM
Hi,

You can edit the template of the GridViewRow and change the yellow ItemBackground_Selected brush. 
This help article explains how to do that.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Enrico
Top achievements
Rank 1
answered on 01 Jul 2013, 12:06 PM
Thanks for the answer.
In the help article that you post, you use Expression Blend. I don't have it.
How I can change change template in xaml?

Thanks & Regards

Enrico
0
Dimitrina
Telerik team
answered on 01 Jul 2013, 02:15 PM
Hello Enrico,

Your another option would be to manually extract the template for the GridViewRow that is available with the installation files of the RadControls. You can find it together with all the other templates used for the GridView inside "Telerik.Windows.Controls.GridView.xaml" file browsing to "InstallationFolder\Silverlight\Themes\OfficeBlack\Themes" folder.

Let me know if you have met any problems with this.
 

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Enrico
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Enrico
Top achievements
Rank 1
Share this question
or