Disable theme for System.Windows.Controls.Button

2 posts, 0 answers
  1. Oren Keinan
    Oren Keinan avatar
    2 posts
    Member since:
    May 2009

    Posted 09 Nov 2015 Link to this post


    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?

  2. Evgenia
    Evgenia avatar
    1437 posts

    Posted 10 Nov 2015 Link to this post

    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.

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