Navigate to a Page of another Class Library

做~自己de王妃 提交于 2019-12-02 17:14:49

问题


I need to create several versions of a core project. Few things can change between core project and its extensions, some functionalities and, above all, design (Fonts, colors, etc). For that, I've created a Class Library. I made a question about that few days ago and I guessed creating the Class Library was the proper way to do it. Here you have a link to the post.

Now that I have all the project in the library, I'm creating those extensions and I would like to Navigate to Pages of the Class Library but from the extensions and I get this exception:

Exception thrown: 'System.AccessViolationException' in MyProject.exe

Additional information: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

The class library contains UserControls and Pages but I'm not sure if this is the best way around. So any suggestion or tutorial will be much appreciated.

Thanks!


回答1:


Luckily there is a workaround by Daniel Vaughan (http://danielvaughan.org/post/UWP-AccessViolationException-when-Navigating-to-a-Page-in-Another-Assembly.aspx):

  • create a Dummy.xaml in the startup project


来源:https://stackoverflow.com/questions/37609360/navigate-to-a-page-of-another-class-library

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!