In my App.xaml code I have the following code:
<Application x:Class="PcgTools.App"
...
<Application.Resources>
<ResourceDictionary>
...
<res:Strings x:FactoryMethod="res:StringResourceHelper.GetStringResources"
x:Key="LocStrings"/>
</ResourceDictionary>
</Application.Resources>
</Application>
I got from the VS2012 compiler an error before to use the FactoryMethod or Attribute construct. But now I get the error: Xaml2009 language construct is not allowed here.
How to fix this?
XAML 2009 is unfortunately useless due to lack of compiler support (although VS recognises it for some stupid reason).
See: MSDN doc on XAML 2009
Basically no current compiler (WPF, SL, WinRT) actually supports it. As far as I know, the only thing which supports XAML 2009 is "loose xaml", where you have a stand-alone xaml file that is opened by a browser directly (which is basically useless).
I don't know of any explanation from Microsoft outlining why on earth it isn't supported. :-(
XAML 2009 is not allowed in compiled XAML (at least not in WPF 4.0), try to move your stuff that uses 2009 constructs to a separate Resource Dictionary file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With