[英]Visual Studio not addin custom user control to toolbox
I created a new C# WPF app project in visual studio 2017 and added a user control to the project.我在 Visual Studio 2017 中创建了一个新的 C# WPF 应用程序项目,并向该项目添加了一个用户控件。 Now when I try to add that user control to my main window it doesnt show up in the toolbox.
现在,当我尝试将该用户控件添加到我的主窗口时,它不会显示在工具箱中。
Ive checked the AutoToolboxPopulate property and it is set to true and Ive rebuilt.我检查了 AutoToolboxPopulate 属性并将其设置为 true 并重建。 Ive tried closing and opening the project and Visual Studio.
我试过关闭和打开项目和 Visual Studio。
What do I need to do to get my controls to show up in the toolbox?我需要做什么才能让我的控件显示在工具箱中?
You can try to add it to the toolbox manually In the toolbox, select the WPF Components.您可以尝试手动将其添加到工具箱中,在工具箱中,选择 WPF Components。 At this time, click Browse, find the dll, add it, and click OK.
这时候点击浏览,找到dll,添加进去,点击确定。
我不小心做了一个普通的用户控件而不是 WPF 用户控件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.