简体   繁体   English

Visual Studio 未将自定义用户控件添加到工具箱

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

相关问题 如何在Visual Studio 2015中创建自定义控件并将其添加到工具箱 - how to create custom control in visual studio 2015 and add it to toolbox 如何将自定义Windows窗体控件添加到Visual Studio工具箱 - How to add a Custom Windows Forms Control into Visual Studio Toolbox Visual Studio 2017中的工具箱控件安装程序(TCI) - Toolbox Control Installer (TCI) in Visual Studio 2017 ReportViewer Control在工具箱visual studio 2015中不可见 - ReportViewer Control Is not Visible in the Toolbox visual studio 2015 WPF中的控件是否与Visual Studio工具箱类似? - Is there a control in WPF similar to the Visual Studio toolbox? 将自定义控件 dll 添加到 Visual Studio 工具箱 - Adding Custom Controls dll to Visual Studio ToolBox 在Visual Studio中将自定义控件添加到工具箱 - Adding Custom Controls to Toolbox in Visual studio 如何将64位用户控件放入Visual Studio 2012的工具箱中? - How can I put a 64-bit user control into Visual Studio 2012's toolbox? 为什么我无法在visual studio 2012 pro中将用户控件加载到我的工具箱? - Why I can't load a user control to my toolbox in visual studio 2012 pro? 我的自定义用户控件在工具箱中显示为灰色 - My custom user control is grayed out in toolbox
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM