Hello,
I'm trying to use the Office2016 theme colors in one of my controls.
To do this, I've used the following XAML:
<
ResourceDictionary
xmlns:tk
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
xmlns:osctrl
=
"clr-namespace:OrdinaSoft.Windows.Controls"
>
<
ResourceDictionary.MergedDictionaries
>
<
tk:Office2016ResourceDictionary
/>
</
ResourceDictionary.MergedDictionaries
>
<
Style
TargetType
=
"osctrl:osRadGroupBox"
>
<
Setter
Property
=
"BorderBrush"
Value
=
"{StaticResource BasicBrush}"
/>
<
Setter
Property
=
"HeaderBrush"
Value
=
"{StaticResource AccentBrush}"
/>
<
Setter
Property
=
"HeaderForeground"
Value
=
"{StaticResource MainBrush}"
/>
</
Style
>
</
ResourceDictionary
>
Unfortunately, this doesn't work! When I run the application I have the following error: "Cannot find resource named 'BasicBrush'. Resource names are case sensitive."
If I look with the debugger just after the resource dictionary is loaded, I can see the resources defined, including BasicBrush!
If I define myself the brushes, with "<Brush x:Key="AccentBrush">#FF2A579A</Brush>" for example, it works correctly.
Why can't I use the Office2016 resources directly?