I created a library that has a Popup UserControl similar to the one here .
When I create a new universal Windows application and create the same UserControl inside the application and open a popup, it will open.
But if I create a class library and create the same UserControl inside it and try to use it (by opening a popup window) inside the application, I get a XamlParseException.
It looks like this:
Windows.UI.Xaml.Markup.XamlParseException event occurred
HResult = -2144665590
Error Message = XAML.
Source = Windows
Stacktrace:
on Windows.UI.Xaml.Application.LoadComponent (object component, Uri resourceLocator, ComponentResourceLocation componentResourceLocation)
in PopupTestLibrary.MyUserControl1.InitializeComponent ()
I canβt understand exactly why this is happening, since the code works fine when not being called from an external class library.
Some questions I found similar to mine here on SO are
XamlParseException when using a page from a library
Unable to create UserControl instance from another assembly
All help is appreciated!
kshitijgandhi
source share