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

Custom Theme for the GridView

30 Answers 654 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ryan Moore
Top achievements
Rank 1
Ryan Moore asked on 22 Apr 2009, 03:02 PM
There is a 'tutorial' in the RadGridView documentation that I was attempting to follow: http://www.telerik.com/help/silverlight/how-to-create-a-custom-theme.html

It mentions: "Every theme of RadGridView contains a file called Resources.xaml. This file contains the Brushes and Colors used by RadGridView. The brushes share the colors  defined in this file. "

I looked around for these Resources.xaml theme files but was unable to find them. If someone could elaborate on how to go about modifying a theme that would really help me out.

Thanks,
Ryan

30 Answers, 1 is accepted

Sort by
0
Milan
Telerik team
answered on 27 Apr 2009, 01:45 PM
Hi Ryan Moore,

The help topic is a little bit misleading and we will fix it as soon as possible. There is such Resources.xaml file but it is still not availble to the public. We are planning to ship the XAML code of our themes as a separate zip file but it is still uknown when we will be able to do tha. If you open a support ticket I can send you the XAML code (including the Resources.xaml) of any of our themes.

Kind regards,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon
Top achievements
Rank 1
answered on 01 Jun 2009, 04:40 PM
Any word on when the resources.xaml will be made available?
0
Milan
Telerik team
answered on 03 Jun 2009, 01:20 PM
Hello Jon Masters,

Unfortunately there is no progress on the matter. Still, we can prepare a sample solution for a specific theme (say Vista) that has all xaml files (including resources.xaml) and send it to you.

All the best,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Jon
Top achievements
Rank 1
answered on 03 Jun 2009, 02:51 PM
A sample project with the Vista theme would be great.
0
Milan
Telerik team
answered on 05 Jun 2009, 12:03 AM
Hello Jon Masters,

Here is the solution that I have promised. In the zip file you will find two foldrs - the first one contains a solution that targets the 413 version of our controls, while the second one targets the 526 version, which you can use should you choose to upgrade to SP2.

The solutions contain a custom theme that is derrived from Vista - there you will find all xaml files including the Resources.xaml file.
Hope this helps.

All the best,
Milan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Dan Thompson
Top achievements
Rank 1
answered on 10 Aug 2009, 09:25 PM
I have successfully implemented the custom theme from this thread. However, the code is quite extensive and will take hours to wade through to simply change things like highlight color from the default "office_black" theme.

Is there a "custom theme" or set of control templates for the out of the box "office_black" theme?
Is is possible to use reflector to obtain these?

It would be better to just edit the Resources.xaml file to change the colors, instead of having to include ALL control templates for the entire gridview. If there is a way to do this, please let me know.
0
Kalin Milanov
Telerik team
answered on 13 Aug 2009, 06:54 AM
Hi Dan Thompson,

Please review my answer in the support ticket you posted.

Best wishes,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Terry
Top achievements
Rank 1
answered on 05 Oct 2009, 02:55 PM
Milan,

i downloaded your ZIP file of the custom theme based on vista.  the individual styles are awesome!  i was wondering if you could attach a version of the solution with defaults (not vista based)?  im having trouble changing the brush color for the background of the GridViewGroupPanel.  im sure its in the Resources.xaml but i cant find it.  it almost looks like theres something on top of it.  Can you help?
0
Kalin Milanov
Telerik team
answered on 07 Oct 2009, 07:30 AM
Hi Terry,

Please find attached Office_Black theme for our WPF controls.
If you are using Blend you can edit grid templates to style the GroupPanel. You start from GridView -> RootitemsControl -> GroupPanel. Once there you change it as to fit the aesthetics of your application.
That being said we have received a lot of requests for providing a GroupPanelStyle property which will let you style it easier and with less XAML. This feature should be available in Q3.

Let me know if you need any further assistance.

Kind regards,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Terry
Top achievements
Rank 1
answered on 07 Oct 2009, 03:06 PM
Kalin Milanov,

no file was attached.  can you try it again?  thanks.
0
Kalin Milanov
Telerik team
answered on 07 Oct 2009, 03:17 PM
Hi Terry,

I have reattached the theme again. I apologize for the inconvenience and the delay.

Sincerely yours,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sivan
Top achievements
Rank 1
answered on 08 Oct 2009, 08:08 AM
hi,
i am a graphic designer (i work in expression blend)  trying to change the gridview style 'office black' to different colors. i downloaded your project, but i'm afraid i don't know what to do next....lets say i did my changes in the small project, how do i implement them to my actual project?
thanks!!
0
Kalin Milanov
Telerik team
answered on 08 Oct 2009, 11:27 AM
Hello Sivan,

There are multiple ways of how to go about and apply your changes. If you are using Blend at the end of your styling session most probably you ended up with a lot of XAML in a resource dictionary (most probably in Window.Resources section of your file).

The way I would go about applying this styling to an actual project will be to create a Resources.xaml file in the solution and paste everything from the Window.Resources section in it. Note that the file you are creating needs to be of type ResourceDictionary and you need to have the proper namespaces included.

Then in the actual project in the file containing the grid register the Resources.xaml file as a merged dictionary (something like)
<Window.Resources>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml" />
    </ResourceDictionary.MergedDictionaries>
</Window.Resources>

At this point you will have access to the Styles and Templates generated by Blend in the real application. Last thing to do is apply those styles to the corresponding elements. You can see this in the original RadGridView in the small solution (the one you used Blend on). It should look something like:
<telerik:RadGridView RowStyle="{StaticResource MyRowStyle}" GroupRowStyle="{StaticResource MyGroupRowStyle}" .... />

I hope this explanation will be of use.

Greetings,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Kalin Milanov
Telerik team
answered on 08 Oct 2009, 11:28 AM
Hello Sivan,

There are multiple ways of how to go about and apply your changes. If you are using Blend at the end of your styling session most probably you ended up with a lot of XAML in a resource dictionary (most probably in Window.Resources section of your file).

The way I would go about applying this styling to an actual project will be to create a Resources.xaml file in the solution and paste everything from the Window.Resources section in it. Note that the file you are creating needs to be of type ResourceDictionary and you need to have the proper namespaces included.

Then in the actual project in the file containing the grid register the Resources.xaml file as a merged dictionary (something like)
<Window.Resources>
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Resources.xaml" />
    </ResourceDictionary.MergedDictionaries>
</Window.Resources>

At this point you will have access to the Styles and Templates generated by Blend in the real application. Last thing to do is apply those styles to the corresponding elements. You can see this in the original RadGridView in the small solution (the one you used Blend on). It should look something like:
<telerik:RadGridView RowStyle="{StaticResource MyRowStyle}" GroupRowStyle="{StaticResource MyGroupRowStyle}" .... />

I hope this explanation will be of use.

Greetings,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Terry
Top achievements
Rank 1
answered on 08 Oct 2009, 06:35 PM
Kalin Milanov,

was the projects in the 'customtheme-wpf-officeblack.zip' file you sent me created using 'RadControls for WPF Q1 2009 SP2'?
0
Kalin Milanov
Telerik team
answered on 09 Oct 2009, 06:41 AM
Hello Terry,

The solution I sent you uses the Q2.SP2 binaries.
Are you interested in an older version?

All the best,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Terry
Top achievements
Rank 1
answered on 09 Oct 2009, 01:37 PM
Kalin Milanov,

i'm definitely interested in an older version.
0
Terry
Top achievements
Rank 1
answered on 12 Oct 2009, 01:19 PM
Kalin,

could you send me an older version?
0
Kalin Milanov
Telerik team
answered on 13 Oct 2009, 09:22 AM
Hi Terry,

I will gladly send you an older version. Just tell me which one are you interested in.

Best wishes,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Terry
Top achievements
Rank 1
answered on 13 Oct 2009, 01:30 PM
i need a version build using the "RadControls for WPF Q1 2009 SP2" binaries.

also, if you have time, a version using the "Telerik RadControls for Silverlight Q2 2009 SP1" binaries.


thanks Kalin.
0
Kalin Milanov
Telerik team
answered on 14 Oct 2009, 09:04 AM
Hello Terry,

Attached I am sending you a custom theme for the WPF controls you requested.
As for the Silverlight 2009.Q2.SP1 - In your Silverlight installation folder there should be a Themes folder containing a Themes.sln. In it you will find the themes for the Silverlight controls.

Greetings,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Terry
Top achievements
Rank 1
answered on 14 Oct 2009, 01:33 PM
Thanks a bunch for the help Kalin.  this is going to help me out a bunch.
0
sivan
Top achievements
Rank 1
answered on 15 Oct 2009, 11:57 AM
hi,
this earlier version is so much more better to work with. i have another question, once adding all the edited xanl to my project, i can't run it and the main error presented is  : "MyCustomTheme does not exist in clr-namespace:CustomeTheme". I add the Custometheme.dll to the project with all the other refrences. what else should i do in order to fix it?
thanks....
0
Kalin Milanov
Telerik team
answered on 20 Oct 2009, 06:21 AM
Hi Sivan,

It would be really helpful if you could send me a sample application demonstrating the issue you are having. Also could you please open a separate thread for this one? 

Thanks. 

All the best,
Kalin Milanov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Olivier
Top achievements
Rank 1
answered on 18 Aug 2010, 01:27 PM
Hello,
I am trying to customize a theme based on "office black" using the described technique but it seems that the zip file provided on the forum contains project using old references that are preventing me to build successfully. Could you please send me an updated version of the custom theme ?
I am currently evaluating your product and my version of Telerik.Windows.Controls is 2010.2.714.35.
Thanks in advance,
Olivier
0
Kalin Milanov
Telerik team
answered on 23 Aug 2010, 09:22 AM
Hello Olivier,

We are currently working on providing the themes for WPF the same way we do for Silverilght. This feature will be available in the our Q3 release. Once we are done you will be able to take them and apply your customizations. I hope the wait will be worth it.

Best wishes,
Kalin Milanov
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
Sven
Top achievements
Rank 1
answered on 18 Nov 2010, 12:22 PM
Hello,

2010 Q3 has been released. We would like to create a custom theme for the RadGridView based on Office black. 

We tried to do this based on the themes in the source code but were unsuccessful.

So I have the following question:

=> Is there a tutorial for 2010 Q3 on creating a custom theme for the RadGridview that can point us in the right direction?
    If not would it be possible to post a demo project on how to customise the Office black theme (or other)

Thanks.

Keep up the good work.

Best regards,

Sven

 
0
Vanya Pavlova
Telerik team
answered on 23 Nov 2010, 10:16 AM
Hello Sven,


With our Q3 you can get the xaml files for all WPF RadControls used in Telerik Themes. We have updated the documentation and now there is an article that shows how to create Custom Theme Project using Telerik Approach. In addition to this I have prepared an example for you that demonstrates how to create such custom project based on our Windows7 Theme and RadSlider.

If you need any further assistance please let me know.

Kind regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
0
ahmet
Top achievements
Rank 1
answered on 25 Dec 2010, 11:52 PM
Hi,

I am trying to customize a theme based on "office black".
I try to use old version of this theme, but build gives a lot of errors.
Could you send me source code of office black  theme?
Version : 2010.2.812.40

Thanks
0
Vanya Pavlova
Telerik team
answered on 27 Dec 2010, 01:40 PM
Hi Ryan,

The templates used in all Telerik themes except Expression_Dark are identical, only the Resources they used are different. With our Q3 release you may get the xaml files for all WPF themes, please follow this link.
Having in mind  the version you used, just replace the newer binaries with these you are currently using.

Regards,
Vanya Pavlova
the Telerik team
Browse the videos here>> to help you get started with RadControls for WPF
Tags
GridView
Asked by
Ryan Moore
Top achievements
Rank 1
Answers by
Milan
Telerik team
Jon
Top achievements
Rank 1
Dan Thompson
Top achievements
Rank 1
Kalin Milanov
Telerik team
Terry
Top achievements
Rank 1
sivan
Top achievements
Rank 1
Olivier
Top achievements
Rank 1
Sven
Top achievements
Rank 1
Vanya Pavlova
Telerik team
ahmet
Top achievements
Rank 1
Share this question
or