Hello,
I have a trouble Saving a resource dictionary which uses Telerik.Windows.Controls assembly. Telerik.Windows.Controls.
The exception thrown:
An unhandled exception of type 'System.NotSupportedException' occurred in System.dll
Additional information: 'Office2013ResourceKeyTypeConverter' is unable to convert 'Telerik.Windows.Controls.Office2013ResourceKey' to 'System.Windows.Markup.MarkupExtension'.
Part of xaml that's causing the problem:
<Grid>
<Path
Stretch="Fill"
Fill="{telerik1:Office2013Resource ResourceKey=ValidationBrush}"
HorizontalAlignment="Left"
VerticalAlignment="Top"
SnapsToDevicePixels="True"/>
<Border Background="{telerik1:Office2013Resource ResourceKey=ValidationBrush}" Margin="5 0 0 0" Padding="1">
<ContentPresenter
Content="{Binding Error}"
TextBlock.Foreground="{telerik1:Office2013Resource ResourceKey=MainBrush}"
Margin="4 2"
TextBlock.FontSize="15"
/>
</Border>
</Grid>
<ContentControl/>
</Grid>
and namespace mapping:
xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
I load this resource dictionary with
var myDict = Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;
and then try to save it with:
System.Windows.Markup.XamlWriter.Save(myDict);
And that's when the exception is thrown.
Compiler tooltip: "Local property 'ResourceKey' can only be applied to types that are derived from ThemeResourceExtension`1"
I've checked it, and Office2013ResourceExtension derives from ThemeResourceExtension`1.
What might be the problem here?
I have a trouble Saving a resource dictionary which uses Telerik.Windows.Controls assembly. Telerik.Windows.Controls.
The exception thrown:
An unhandled exception of type 'System.NotSupportedException' occurred in System.dll
Additional information: 'Office2013ResourceKeyTypeConverter' is unable to convert 'Telerik.Windows.Controls.Office2013ResourceKey' to 'System.Windows.Markup.MarkupExtension'.
Part of xaml that's causing the problem:
<Grid>
<Path
Stretch="Fill"
Fill="{telerik1:Office2013Resource ResourceKey=ValidationBrush}"
HorizontalAlignment="Left"
VerticalAlignment="Top"
SnapsToDevicePixels="True"/>
<Border Background="{telerik1:Office2013Resource ResourceKey=ValidationBrush}" Margin="5 0 0 0" Padding="1">
<ContentPresenter
Content="{Binding Error}"
TextBlock.Foreground="{telerik1:Office2013Resource ResourceKey=MainBrush}"
Margin="4 2"
TextBlock.FontSize="15"
/>
</Border>
</Grid>
<ContentControl/>
</Grid>
and namespace mapping:
xmlns:telerik1="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
I load this resource dictionary with
var myDict = Application.LoadComponent(new Uri(packUri, UriKind.Relative)) as ResourceDictionary;
and then try to save it with:
System.Windows.Markup.XamlWriter.Save(myDict);
And that's when the exception is thrown.
Compiler tooltip: "Local property 'ResourceKey' can only be applied to types that are derived from ThemeResourceExtension`1"
I've checked it, and Office2013ResourceExtension derives from ThemeResourceExtension`1.
What might be the problem here?