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

Change selection and mouseover colors of row (using themes?)

1 Answer 87 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Maarten
Top achievements
Rank 1
Maarten asked on 26 Mar 2009, 11:19 AM
Hi,

I want to implement a feature to make the row selection and mouseover colors changeable via a property that we expose on our own DataGrid control that wraps the GridView.

I guess these colors are defined in the theming that is applied to the controls, so I would need to change the theme.

I've found an example on http://blogs.telerik.com/ValentinStoychev/Posts/08-11-19/Tweaking_the_Theme_colors_for_Telerik_Silverlight_Controls.aspx that already helped a lot, but there's one problem.

<telerik:Theme x:Key="customTheme" Source="/MyCustomThemeAssembly;component/Themes/generic.xaml" />

In the code above the reference to a custom theme is done via a dll, but we need to be able to change the colors directly.
Is there any way we can make changes to a theme directly?

Or is there any other way to change the selection and mouseover colors of a row?
Thanks in advance.

Kind regards,


Maarten Thoelen


1 Answer, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 27 Mar 2009, 08:45 PM
Hello Maarten-

In the Q1 RadControls for Silverlight you can directly edit all control templates in Blend. You simple open the control in Blend, create a copy of its template, and then you can begin directly editing the XAML. The changes will be stored directly in your project, so you can easily edit them at any time. This approah is available for editing the default RadControl templates; for editing the non-default themes a little more work is required (similar the approach you've used in the past with generic.xaml). Give Blend template editing a try and see if that works for you.

Hope that helps!
-Todd
Tags
GridView
Asked by
Maarten
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Share this question
or