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

How Can I Create a Custom Theme for WPF application?

7 Answers 857 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jordi
Top achievements
Rank 1
Jordi asked on 16 Feb 2011, 05:38 PM
I saw several tutorials about that, but seams designed for Silverlight plataform.
http://www.telerik.com/help/wpf/common-styling-apperance-themes-custom-theme-project-telerik-approach.html

I download the tutorial example. 214114_mycustomtheme-sl-812 (I don't remember de forum link, sorry)

It Works great for Silverlight, I tried to do the same in wpf but I can't, troubles about dictionary.

Thank you.

7 Answers, 1 is accepted

Sort by
0
Vanya Pavlova
Telerik team
answered on 17 Feb 2011, 08:44 AM
Hello Jordi,

 
From the following forum thread you can download a sample application and you will find a very useful information on that matter.

Regards,
Vanya Pavlova
the Telerik team
0
Jordi
Top achievements
Rank 1
answered on 17 Feb 2011, 01:46 PM
Hi,

I tried the example CustomThemeDemoWindows7.zip and It works !! ;-)
Now I created a custom theme with several styles like ButtonChrome, Slider...
¿How  can I apply  my custom theme to all aplication controls?
I tried something like this, but not work:
Telerik.Windows.Controls.StyleManager.ApplicationTheme  = new MyCustomTheme();

Setting element by element like this, works:

var theme = new MyCustomTheme();
StyleManager.SetTheme(slider1, theme);
StyleManager.SetTheme(testButton, theme);

Regards. Jordi
0
Vanya Pavlova
Telerik team
answered on 17 Feb 2011, 05:37 PM
Hi Jordi,


If you need to set this custom theme as an application theme, just specify this theme in App.xaml.cs of your application:

namespace CustomThemeDemoWindows7
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            StyleManager.ApplicationTheme = new MyTheme.MyCustomTheme();
        }
  
    }
}

Best wishes,
Vanya Pavlova
the Telerik team
0
Jordi
Top achievements
Rank 1
answered on 21 Feb 2011, 12:05 PM
Hi, I'm trying to change the RadGridView theme color. I have followed the approach creating a new theme using Windows7 Theme like base.
When I applied the theme don't appear the data inside GridView.  What would be the best approach, the fastest to change the GridView color palette to green?
Create a entire theme or chaning style of gridview components ?
Note: I'm using Q2  2010 libraries, Now my theme contains only a GridViewHeaderCell , GridViewRow and GridViewToogleButton styles
0
Vanya Pavlova
Telerik team
answered on 21 Feb 2011, 03:48 PM
Hello Jordi,

 
When you create fully functional custom theme, you need to implement the same Telerik approach demonstrated in our online documentation. If you need to create your custom theme, you need to style all of its components in a proper way. Since our Q3 2010 release you may get the xaml files for all Telerik themes /WPF from the Themes folder of your personal installation.
I am attaching this folder that corresponds to the version of RadControls that you are using. Just copy the xaml files for all RadGridView's components to your custom theme project, reference them in Telerik.Windows.Controls.GridView.xaml and change the brushes you need. 

Best wishes,
Vanya Pavlova
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Jordi
Top achievements
Rank 1
answered on 23 Feb 2011, 04:21 PM
First Thanks for the themes files.

I have some troubles when I show the grid filter options. It doesn't appear the posible filter values. See the image please
0
Vanya Pavlova
Telerik team
answered on 24 Feb 2011, 07:33 PM
Hi Jordi,

 
Considering the template structure of the FilteringControl, you need to add styles for the controls resideing in this template. You need to add to your custom theme the xaml files for all controls such as RadComboBox, RadButton, StringFilterEditor, CheckBox, ListBox ... in the same way as it was implemented in our themes.


Please give it a try and let me know if you need any further assistance.

Greetings,
Vanya Pavlova
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
General Discussions
Asked by
Jordi
Top achievements
Rank 1
Answers by
Vanya Pavlova
Telerik team
Jordi
Top achievements
Rank 1
Share this question
or