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

How to Customize HeaderTemplate for non-default theme

3 Answers 91 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dan Kinchen
Top achievements
Rank 1
Dan Kinchen asked on 17 May 2010, 03:31 PM
Hello,

I ran across the following video:

http://www.screencast.com/users/borovinka/folders/Jing/media/32a62d8f-e6d3-420c-be8b-cbbc214daa9a 

This video demonstrates exactly what I need to accomplish with the notable exception that I am not using the default telerik theme (I'm using Office_Blue).  When you go to modify the GridViewHeaderCellTemplate Blend hardcodes the values of the colors for the default theme, not the one I am using which is set at the app level.

Any way to get blend to pick up the correct theme to modify?

3 Answers, 1 is accepted

Sort by
0
Yavor Georgiev
Telerik team
answered on 17 May 2010, 04:47 PM
Hello Dan Kinchen,

 You should try to set Office_Blue as your application theme globally, in your App.xaml.cs.

You can also find the complete source code for all themes in your RadControls for Silverlight installation folder (for example: C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2010 SP1\Themes). You can either include the relevant XAML files in your project, or just copy/paste the template of the control you need.

Greetings,
Yavor Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Dan Kinchen
Top achievements
Rank 1
answered on 17 May 2010, 05:23 PM
I do set it globally in the app.xaml.cs.  Perhaps I wasn't clear when I stated "When you go to modify the GridViewHeaderCellTemplate Blend hardcodes the values of the colors for the default theme, not the one I am using which is set at the app level."

Anyway, to reiterate.  If you

1) Set up a non-default theme in your App.xaml.cs
2) Add a RadGridView to a page
3) Open the page in Blend 3
4) Attempt to modify the HeaderCellStyle

The result is that the custom style that Blend creates will be based off of the default telerik theme (Office_Black), not the one set up in the App.xaml.cs (in my case Office_Blue).

I guess what you're telling me is I need to go pull apart the theme from the source code and update the style.
0
Yavor Georgiev
Telerik team
answered on 18 May 2010, 01:59 PM
Hi Dan Kinchen,

 We have done some investigating, and it seems that Blend does not pick up a non-default theme set globally in code-behind. What you can do is:

  • Drop the GridViewHeaderCell part in your workspace
  • In your XAML, add the telerik:StyleManager.Theme="Office_Blue" attribute to the GridViewHeaderCell tag
  • In the Design view, select the GridViewHeaderCell part, and choose Edit Style > Edit a copy from the object menu.
This extracts the correct style for the theme.

You can, of course, still use the source code for the themes that we provide in our installation redistributable.

Best wishes,
Yavor Georgiev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
GridView
Asked by
Dan Kinchen
Top achievements
Rank 1
Answers by
Yavor Georgiev
Telerik team
Dan Kinchen
Top achievements
Rank 1
Share this question
or