Custom Theme Project RC 4

2 posts, 0 answers
  1. Ray Parker
    Ray Parker avatar
    1 posts
    Member since:
    Mar 2010

    Posted 31 Mar 2010 Link to this post

    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.
  2. Kalin Milanov
    Kalin Milanov avatar
    447 posts

    Posted 05 Apr 2010 Link to this post

    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.
Back to Top