导航到另一个类库的页面 [英] Navigate to a Page of another Class Library

查看:29
本文介绍了导航到另一个类库的页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建一个核心项目的多个版本.核心项目及其扩展、一些功能以及最重要的设计(字体、颜色等)之间几乎没有什么可以改变的.为此,我创建了一个类库.几天前我提出了一个问题,我猜创建 Class Library 是正确的方法.在这里,您可以看到帖子的链接.

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.

现在我在库中拥有所有项目,我正在创建这些扩展,我想导航到 Class Library 的页面,但是从扩展中我得到这个异常:

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:

抛出异常:MyProject.exe 中的System.AccessViolationException"

附加信息:尝试读取或写入受保护的内存.这通常表明其他内存已损坏.

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

类库包含 UserControlsPages 但我不确定这是否是最好的方法.因此,任何建议或教程将不胜感激.

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.

谢谢!

推荐答案

幸运的是 Daniel Vaughan 提供了一个解决方法 (http://danielvaughan.org/post/UWP-AccessViolationException-when-Navigating-to-a-Page-in-Another-Assembly.aspx):

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

  • 在启动项目中创建一个 Dummy.xaml

这篇关于导航到另一个类库的页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆