We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SkinManager on Derived WPF controls

Thread ID:





94341 May 7,2010 04:20 PM UTC May 13,2010 07:34 AM UTC WPF 3
Tags: Tools
Qingde Shi
Asked On May 7, 2010 04:20 PM UTC


I understand the SkinManager can be applied to Syncfusion controls and WPF framework controls. How to make the SkinManager apply to the controls that derived from WPF controls? for example:

public class TestButton : Button
public TestButton():base()


I see the TestButton does not get the skin applied to when used in UserControls. and I have loaded resource SkinManager.xaml into the App.xaml.



Michael Matela
Replied On May 10, 2010 07:16 AM UTC

The skins are applied via a ResourceDictionary. Due to WPF-inheritance rules, visual children of an item with the SkinManager set will also get the skins. So if you have a top-level window with XAML such as the following and you add your button to it, it will also get the skin:

You can also add this to your button's XAML, so the skins will always work. Note that the SkinManager.xaml is currently very large, so parsing it takes quite some time. Thus, it is best to have it only on top-level windows.

Qingde Shi
Replied On May 10, 2010 01:28 PM UTC

Thanks for the reply, however, it does not work. like I said in the first post, I have put the SkinManager.xaml in the App.xaml resources, and I also tried like what you said put the SkinManager.xaml resource in the window itself, but the derived controls just not get the skin applied, while the framework controls get applied perfectly.

Mayavel K [Syncfusion]
Replied On May 13, 2010 07:34 AM UTC

Hi Qingde,

Thanks for your interests in Syncfusion products.

Skin Manager contains styles for all the framework and our controls.
When we merge Skin Manager in application, it will merge all the controls styles as resource and it will get apply automatically through resource lookup logic in WPF.
When you write a new style to a control, it usually overwrites the existing skin style and you will get only the new skin style.
Even though it inherit from that control. To overcome this, you should specify the BasedOn property while writing style for the control. By using this property, you can get both the existing skin style as well as the custom control style for the control.

The below code snippet will illustrates this:

Please let us know if you have any questions,

Mayavel K


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon