I'm using WPF RadControls Q3 2012 with VS2012. I need to make some changes to the RadGridView templates and I hoped to use Blend for VS2012 to help me with this. Blend for VS2012 doesn't support WPF projects until Update 2, so I've installed VS2012 Update 2 CTP 4 and Blend is now working with WPF projects.
My project is using RadControls with implicit styles, to this end I have the following app.xaml.cs code behind
And in my Window class I have
But when I open this in Blend I get the error "The resource 'RadWindowStyle' could not be resolved."
What's causing this and what's the best way to fix it please?
My project is using RadControls with implicit styles, to this end I have the following app.xaml.cs code behind
public
App()
{
InitializeComponent();
SetTheme(
"Expression_Dark"
);
}
public
void
SetTheme(
string
themeName)
{
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)
});
// ... plus more merged resources
}
And in my Window class I have
<
tk:RadWindow
x:Class
=
"GridViewTesting.RadGridView.RadGridViewVw"
x:ClassModifier
=
"internal"
xmlns:rgv
=
"clr-namespace:GridViewTesting.RadGridView"
Header
=
"Telerik RadGridView Demo"
Height
=
"600"
Width
=
"500"
>
<
tk:RadWindow.Resources
>
<
Style
TargetType
=
"rgv:RadGridViewVw"
BasedOn
=
"{StaticResource RadWindowStyle}"
/>
</
tk:RadWindow.Resources
>
<!-- Controls defined here. -->
</
tk:RadWindow
>
But when I open this in Blend I get the error "The resource 'RadWindowStyle' could not be resolved."
What's causing this and what's the best way to fix it please?