Best theming approach

3 posts, 0 answers
  1. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 06 Jun 2014 Link to this post

    I have a question about the recommended theming approach to use. I get the feeling that theming aspect of telerik controls has developed a little over the years, and there now appears to be a number of possible approaches, but it's not clear to me which is the best or recommended approach to take.

    If we forget about the use of the StyleManager class, from what I can tell you can there are still a number of approaches

    1- Link to the required Binaries, link to the theme DLL under the same location and specify a number of resource dictionaries in the format <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml" />

    2 - Link to the required NoXaml.Binaries, link to the theme DLL under NoXaml.Binaries as well and specify the resource dictionaries as above

    3 - Link to the required Binaries, include the required XAML Themes from the Themes.implicit directory as PAge resources and specify the local resource dictionaries as  <ResourceDictionary Source="Themes/System.Windows.xaml"/>

    4 - Link to the required NoXAML.Binaries, include the required XAML Themes from the Themes.implicit directory as PAge resources and specify the local resource dictionaries as  <ResourceDictionary Source="Themes/System.Windows.xaml"/>


    What's the differences and which would be the best approach to take?

    Cheers
  2. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 09 Jun 2014 Link to this post

    Hi Jason,

    What we recommend is when using implicit styles to reference the assemblies from Binaries.NoXaml folder as these contain no XAML ( as the XAML is merged separately) and are smaller in size ( so they can be loaded faster) - this eliminates approaches n.1 and n.3.

    As to the n.2 and n.4  -
    referencing the ResourceDictionaries directly from the theme assembly (n.2) is may be the easier approach regarding maintenance, this means that when upgrading, you only need to update the references, while with the approach n.4 you should copy again the XAML files in the project.  However, practically both approaches lead to the same result and it is up to you to decide which of them is more suitable to you.

    Regards,
    Yana
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. Jason
    Jason avatar
    47 posts
    Member since:
    Jan 2013

    Posted 09 Jun 2014 in reply to Yana Link to this post

    Thanks for the reply. So happens that is the approach we are taking, but good to know we're on the right track.

    Thanks
Back to Top