Cannot instantiate a Page or User Control w/ NavigationView from a WinUI Class Library #9125
Unanswered
nikolayvpavlov
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I have a WinUI 3 Class Library containing a page. I try to load these two in a grid in a separate WinUI 3 application. If the page contains a
NavigationView
object, the constructor of the page crashes with:Microsoft.UI.Xaml.Markup.XamlParseException: 'XAML parsing failed.'
If the page contain something else, for example, a list box, it is loaded without any problems.
Sample Code
Loading the page
This works
This doesn't:
Notes
I have tried with both a user control instead of a page and observed the same behavior. Using a
NavigationView
causes the constructor to crash.If I embed the
NavigationView
in Xaml, all works properly.Beta Was this translation helpful? Give feedback.
All reactions