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

Disable theme for System.Windows.Controls.Button

1 Answer 266 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Kryon Systems
Top achievements
Rank 1
Kryon Systems asked on 09 Nov 2015, 07:58 AM

Hi,

I'm using Telerik's TreeView, GridView, ListBox, DragDropManager in my project.

I decided to use the "Binaries.NoXaml" dlls because I don't really need all the themes included. I referenced the relevant control dlls + Telerik.Windows.Themes.Windows8.dll just so I can use the styling for the Telerik controls that I do use.

In my app.xaml I added in merged dictionaries the following resource dictionaries:

<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/>
<ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/>

I noticed that "System.Windows.Controls.Button" also get styled with your Windows8 theme!

How can I cancel this behavior and get only the Telerik controls to have the Windows8 theme?

1 Answer, 1 is accepted

Sort by
0
Evgenia
Telerik team
answered on 10 Nov 2015, 11:41 AM
Hi Oren,

You are doing everything correct with merging implicit styles and referencing assemblies from Binaroes.NoXaml folder. Onto your question - Indeed our theming mechanism supports some of the native Microsoft WPF controls listed in this help topic.
The xaml style file that keeps the MS controls themed styles and templates is System.Windows.xaml. Please remove or comment it from your global merged dictionaries (App.xaml) and the MS Button will fallback to its native visual appearance defined by Microsoft.

 Let me know if there is anything else I can assist you with.

Regards,
Evgenia
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Kryon Systems
Top achievements
Rank 1
Answers by
Evgenia
Telerik team
Share this question
or