[英]WinRT - How to use custom control from another project within the same solution?
I use Visual Studio 2015 and create a WinRT Universal App. 我使用Visual Studio 2015并创建WinRT通用应用程序。
For my custom controls I have created a project within the same solution. 对于我的自定义控件,我已经在同一解决方案中创建了一个项目。 Now I need to use the controls in the main application project, but they don't appear in the designer Toolbox. 现在,我需要在主应用程序项目中使用控件,但是这些控件不会出现在设计器的“工具箱”中。 The Toolbox displays only controls from the active project, but not the controls from the whole solution. 工具箱仅显示活动项目中的控件,而不显示整个解决方案中的控件。 Is there a way to use my custom controls in the main project? 有没有办法在主项目中使用我的自定义控件? I tried Add Reference for my auxiliary project in Solution Explorer, but it didn't help. 我在解决方案资源管理器中为辅助项目尝试了“添加引用”,但没有帮助。
There is no way for toolbox to display your custom control from all your project inside the solution. 工具箱无法显示解决方案中所有项目的自定义控件。 You need to define the namespace in xaml and write the code manually. 您需要在xaml中定义名称空间并手动编写代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.