简体   繁体   English

为什么我在Visual Studio中的对象浏览器中找不到System.Windows.Controls命名空间?

[英]Why don't I find the System.Windows.Controls namespace in my object browser in Visual Studio?

为什么我在Visual Studio中的对象浏览器中找不到System.Windows.Controls命名空间?

You have to reference the PresentationFramework assembly from Microsoft because you are trying to use a WPF namespace . 您必须引用Microsoft的PresentationFramework程序集,因为您正在尝试使用WPF namespace

If you set up a WPF project from scratch it should be included. 如果您从头开始设置WPF项目,则应包含该项目。 When you start in VS with some other project type you might need to add this reference by hand. 当您使用其他项目类型在VS中启动时,您可能需要手动添加此引用。 Right-click the references node under your project add select Add Reference. 右键单击项目下的引用节点,然后选择“添加引用”。 Then in the dialog that pops up you go to the tab page called .NET and browse for the right assembly. 然后在弹出的对话框中,转到名为.NET的选项卡页面并浏览正确的程序集。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Visual Studio引用(对象浏览器)的“系统”名称空间中查找控制台类 - Find Console class in System namespace in Visual Studio references (Object browser) 将System.Windows.Controls存储到字典中 - Store System.Windows.Controls into a dictionary 无法导入System.Windows.Controls - Cannot Import System.Windows.Controls 将在窗口服务中使用System.Windows.Controls导致问题 - Will using the System.Windows.Controls in a window service cause issues Visual Studio 2017找不到命名空间系统 - Visual Studio 2017 can't find namespace System 我在 Visual Studio 2019 中找不到 System.Media 命名空间 - I can't find the System.Media namespace in Visual Studio 2019 如何将System.Windows.Controls强制转换为System.Windows.Forms wpf - how to typecast System.Windows.Controls to System.Windows.Forms wpf 为什么在Visual Studio 2013 Express中,我没有项目模板Windows Control Library? - Why in visual studio 2013 express, I don't have a project template Windows Control Library? 为什么我在 Visual Studio 2022 中找不到带有 master 的 web 表格? - Why don't I find web form with master in visual studio 2022? 为什么我的任务没有显示在Visual Studio的“任务”窗口中? - Why don't my Tasks show in the Visual Studio Tasks window?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM