简体   繁体   English

WinRT-如何在同一解决方案中使用来自另一个项目的自定义控件?

[英]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.

相关问题 将用户控件从一个项目复制到同一解决方案中的另一个项目 - Copy User Control from one project to another within same solution 如何在同一解决方案中执行另一个项目? - How to execute another project within the same solution? 在同一解决方案中使用另一个项目的引用 - Use reference from another project at the same solution 在同一解决方案中将一个项目的照片文件用于另一个项目 - Use photo file from one project to another project in the same solution 一个项目的class在同一个方案下如何在另一个项目中使用? - How to use a class of one project in another project under the same solution? 如何更改和使用自定义控件的DLL和项目及解决方案的名称 - How to change the name of the DLL & project& solution of a custom control and use it VS2010:使用解决方案中另一个项目的命名空间? - VS2010: Use namespace from another project within the solution? 在同一解决方案中使用从一个项目到另一个项目的依赖关系 - Use dependency from one project to another in the same solution 从同一解决方案中运行第二个项目 - Run a second project from within the same solution 如何从同一解决方案检查另一个项目的版本 - How to check the version of another project from the same solution
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM