We wish to use application wide implicit styling of our application.
This documentation (http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html) states that all we have to do is merge in the resources for the selected theme at the application level. We are doing this in code behind since the theme to be used is dependent on settings obtained from the user.
Adding this to the application's constructor implictly themes all the standard controls in the manner described in the current theming documentation.
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/System.Windows.xaml",
UriKind.RelativeOrAbsolute)
});
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.xaml",
UriKind.RelativeOrAbsolute)
});
However adding this:
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName
+ ";component/Themes/Telerik.Windows.Controls.Navigation.xaml",
UriKind.RelativeOrAbsolute)
});
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName
+ ";component/Themes/Telerik.Windows.Controls.Docking.xaml",
UriKind.RelativeOrAbsolute)
});
Does not result in any of the docking components being themed.
Attempting this:
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName
+ ";component/Themes/Telerik.Windows.Documents.xaml",
UriKind.RelativeOrAbsolute)
});
Results in the exception "Could not load file or assembly Telerik.Windows.Documents" even though the documentation explicitly states that use of this resource is dependent on Telerik.Controls and Telerik.Controls.Input only, (both of which we reference).
This page (http://www.telerik.com/help/wpf/common-styling-apperance-setting-theme-wpf.html) states that setting an application wide built-in theme will not theme built-in controls, only the RadControls, while this page (http://www.telerik.com/help/wpf/common-styling-themes-mscontrols.html) describes how most of the common built in controls are actually themed as well.
My impression so far is that the documentation is out-of-date, incomplete and occasionally self-contradictory.
Using version 2012.3 with C#.
This documentation (http://www.telerik.com/help/wpf/styling-apperance-implicit-styles-overview.html) states that all we have to do is merge in the resources for the selected theme at the application level. We are doing this in code behind since the theme to be used is dependent on settings obtained from the user.
Adding this to the application's constructor implictly themes all the standard controls in the manner described in the current theming documentation.
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/System.Windows.xaml",
UriKind.RelativeOrAbsolute)
});
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName + ";component/Themes/Telerik.Windows.Controls.xaml",
UriKind.RelativeOrAbsolute)
});
However adding this:
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName
+ ";component/Themes/Telerik.Windows.Controls.Navigation.xaml",
UriKind.RelativeOrAbsolute)
});
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName
+ ";component/Themes/Telerik.Windows.Controls.Docking.xaml",
UriKind.RelativeOrAbsolute)
});
Does not result in any of the docking components being themed.
Attempting this:
Resources.MergedDictionaries.Add(new ResourceDictionary()
{
Source = new Uri("/Telerik.Windows.Themes." + themeName
+ ";component/Themes/Telerik.Windows.Documents.xaml",
UriKind.RelativeOrAbsolute)
});
Results in the exception "Could not load file or assembly Telerik.Windows.Documents" even though the documentation explicitly states that use of this resource is dependent on Telerik.Controls and Telerik.Controls.Input only, (both of which we reference).
This page (http://www.telerik.com/help/wpf/common-styling-apperance-setting-theme-wpf.html) states that setting an application wide built-in theme will not theme built-in controls, only the RadControls, while this page (http://www.telerik.com/help/wpf/common-styling-themes-mscontrols.html) describes how most of the common built in controls are actually themed as well.
My impression so far is that the documentation is out-of-date, incomplete and occasionally self-contradictory.
Using version 2012.3 with C#.