Hi,
I have copied the Summer theme and renamed all it's tags to suit our project.
Telerik controls are all referenced from within the theme project
All xaml files have their Build Action set to Resource
I have added a theme class, as follows:
My understanding of themes is that the BuiltIn attribute overrides the this.Source and the Generic.xaml is ignored.
The theme compiles. Assume I have set the namespace to Acme.RadControls.Theme. This is also the name of the assembly.
The assembly compiles successfully.
In the Silverlight project, I add the following namespace to my page:
In the page resources, I add the theme tag:
In the radgrid header, I added the stylemanager property, as follows:
The application compiles successfully, and then runs.
When I try to access the page, however, it crashes with the following error:
"A ResourceDictionary '/Acme.RadControls.Theme;component/Themes/Telerik.Windows.Controls.GridView.xaml' cannot be found. Please make sure that references to the needed theme assemblies have been added to the project."
Any ideas what I am doing wrong?
I have copied the Summer theme and renamed all it's tags to suit our project.
Telerik controls are all referenced from within the theme project
All xaml files have their Build Action set to Resource
I have added a theme class, as follows:
using System;
using Telerik.Windows.Controls;
namespace Acme.RadControls.Theme
{
[ThemeLocation(ThemeLocation.BuiltIn)]
public class AcmeDefaultTheme : Telerik.Windows.Controls.Theme
{
public AcmeDefaultTheme()
{
this.Source = new Uri("/Acme.RadControls.Theme;component/themes/Generic.xaml", UriKind.Relative);
}
}
}
My understanding of themes is that the BuiltIn attribute overrides the this.Source and the Generic.xaml is ignored.
The theme compiles. Assume I have set the namespace to Acme.RadControls.Theme. This is also the name of the assembly.
The assembly compiles successfully.
In the Silverlight project, I add the following namespace to my page:
xmlns:acmeTheme="clr-namespace:Acme.RadControls.Theme;assembly=Acme.RadControls.Theme"
In the page resources, I add the theme tag:
<
navigation:Page.Resources
>
<
acmeTheme:AcmeDefaultTheme
x:Key
=
"AcmeDefaultTheme"
/>
</
navigation:Page.Resources
>
In the radgrid header, I added the stylemanager property, as follows:
<
telerik:RadGridView
x:Name
=
"grdProducts"
ItemsSource
=
"{Binding PagedItemList, Source={StaticResource PFOViewModel}}"
IsFilteringAllowed
=
"True"
AutoGenerateColumns
=
"False"
FrozenColumnCount
=
"6"
Grid.Row
=
"4"
Grid.Column
=
"0"
AutoExpandGroups
=
"True"
ShowGroupPanel
=
"False"
telerik:StyleManager.Theme
=
"{StaticResource AcmeDefaultTheme}"
>
The application compiles successfully, and then runs.
When I try to access the page, however, it crashes with the following error:
"A ResourceDictionary '/Acme.RadControls.Theme;component/Themes/Telerik.Windows.Controls.GridView.xaml' cannot be found. Please make sure that references to the needed theme assemblies have been added to the project."
Any ideas what I am doing wrong?