Hello!
I'm trying to create custom theme based on Windows8 theme. I did everything as it said in the topic http://docs.telerik.com/devtools/silverlight/styling-and-appearance/stylemanager/creating-a-custom-theme/common-styling-apperance-themes-custom-theme-project.html
1. I've created Silverlight Class Library project with "Themes" folder
2. I've copied xaml files from "Themes" folder of Windows8 theme. I want to create a copy of Windows8 theme and modify it later, so I've copied all of files.
3. I've created "General.xaml" file with code like this
<
ResourceDictionary
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
>
<
ResourceDictionary.MergedDictionaries
>
<
ResourceDictionary
Source
=
"/SomeDefaultTheme;component/Themes/Controls.Chart.xaml"
/>
<
ResourceDictionary
Source
=
"/SomeDefaultTheme;component/Themes/Controls.Data.xaml"
/>
<!--and so on-->
</
ResourceDictionary.MergedDictionaries
>
</
ResourceDictionary
>
4. I've created theme class
public
class
SomeDefaultTheme : Telerik.Windows.Controls.Theme
{
public
SomeDefaultTheme()
{
this
.Source =
new
Uri(
"/SomeDefaultTheme;component/Themes/Generic.xaml"
, UriKind.Relative);
}
}
5. I've attached my theme to my application using StyleManager
telerik:StyleManager.Theme="{Binding Path=CurrentTheme, Source={StaticResource userInterfaceStyles}}"
But I have no effect. If I apply styles of standart theme, I see changes, but if I use my custom theme, nothing happends.
Also, I have strange error in General.xaml. The root "ResourceDictionary" element is underlined and I see an error "Element is already the child of another element".
I've tried to attach project code, but I can't attach an archive.