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

Best theming approach

2 Answers 48 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 06 Jun 2014, 09:26 AM
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 Answers, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 09 Jun 2014, 08:54 AM
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.
 
0
Jason
Top achievements
Rank 1
answered on 09 Jun 2014, 08:57 AM
Thanks for the reply. So happens that is the approach we are taking, but good to know we're on the right track.

Thanks
Tags
General Discussions
Asked by
Jason
Top achievements
Rank 1
Answers by
Yana
Telerik team
Jason
Top achievements
Rank 1
Share this question
or