Please let me know how to apply telerik themes at runtime.
This is what iam doing:
1. I added in the <UserControl.Resources> the below:
<
ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" x:Name="resourcedic"
xmlns:telerik="clr-namespace:Telerik.Windows.Controls">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary
Source="/Telerik.Windows.Themes.Office_Blue;Component/Themes/Office/Blue/Docking.xaml" />
<ResourceDictionary Source="/Telerik.Windows.Themes.Office_Blue;Component/Themes/Office/Blue/Button.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
2. In .cs file iam doing the below to apply the them to the canvas inside the raddocpane:
ResourceDictionary dic = resourcedic;
if (dic.MergedDictionaries.Count != 0)
{
Uri uri = dic.MergedDictionaries[0].Source;
ImplicitStyleManager.SetResourceDictionaryUri(grdresult, uri);
ImplicitStyleManager.SetApplyMode(grdresult, ImplicitStylesApplyMode.Auto);
ImplicitStyleManager.Apply(grdresult);
}
But the themes are not applying.
Please let me know the steps to go about
Regards
Chitra K