[英]Why don't I find the System.Windows.Controls namespace in my object browser in Visual Studio?
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.