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

Custom Theme Project RC 4

1 Answer 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ray Parker
Top achievements
Rank 1
Ray Parker asked on 31 Mar 2010, 10:57 PM
I've been unable to get any sort of custom theme to work.  I'm using 4 RC, etc.  The application is working fine other than this.

What I want to do is to create a copy of the Office Blue them and change some colors at design time.  It would be great if you had a step-by-step recipe or could point me to one.  What I've been trying:

  • Created a Silverlight Library project (PmcCustomTheme) and took all of the xaml from the OfficeBlue (C:\Program Files (x86)\Telerik\RadControls for Silverlight Q1 2010\Themes\OfficeBlue) and put it a directory called Themes right off the root dir.
  • Created a class derived from Theme, call PmcBlue and put the following code in the constructor: Source = new Uri(@"/PmcBlue;component/Themes/Common.xaml", UriKind.Relative); =>  This particular line doesn't work.
  • In the other (Silverlight) project, I have this line in the constructor of my main page (MainPage.xaml.cs): StyleManager.ApplicationTheme = new PmcBlue(); and have a reference to the other project to hook things up.

Where am I going wrong?

Thank you in advance!

PS:  Also, I have made sure to include references to everything in the theme project.

1 Answer, 1 is accepted

Sort by
0
Kalin Milanov
Telerik team
answered on 05 Apr 2010, 01:14 PM
Hi Ray Parker,

Please find attached a sample solution which applies a Office_Blue as a custom theme.
The steps taken are as follows:
1. Create your project
2. Add Office_Blue theme project to your solution
3. Convert the Office_Blue project to SL4 project
4. In your project add a project reference to Office_Blue
5. In app XAML define Office_Blue as application theme (you will need reference to Telerik.Windows.Controls to do that)

I hope this works.

Sincerely yours,
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.
Tags
General Discussions
Asked by
Ray Parker
Top achievements
Rank 1
Answers by
Kalin Milanov
Telerik team
Share this question
or