Value is out of Range Exception While setting ResourceDictionary Source to CustomControl's generic.X
Posted
by Subhen
on Stack Overflow
See other posts from Stack Overflow
or by Subhen
Published on 2010-05-12T06:21:53Z
Indexed on
2010/05/12
6:24 UTC
Read the original article
Hit count: 395
Hi,
I have a custom Control which contains the generic.xaml inside the Themes folder. I have set the build action to Resource.
Now from App.xaml I am setting the reference to the DLL by using :
xmlns:localFolder="clr-namespace:customControl;assembly=customControl"
After the reference is set I am trying to Merge the Resource dictionary in my App.xaml as follow:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="localFolder;component/Themes/generic.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
But while running my application I am getting the following XAMLParseException
:
Attribute localFolder;component/Themes/generic.xaml value is out of range. [Line: 16 Position: 44]
© Stack Overflow or respective owner