c# - vs2010/c#中的表命名空间错误

标签 c# visual-studio-2010 namespaces

我在我的项目中添加了一个表格,它是这样的:

            Table table1 = new Table();
            table1.RowGroups.Add(new TableRowGroup());
            table1.RowGroups[1].Rows.Add(new TableRow());
            TableRow currentRow = table1.RowGroups[1].Rows[1];

当我添加表格时,为了引用它,我添加了一个引用presentationFramework.dll 以开始使用命名空间“System.Windows.Documents”。然后它开始给我 3 个错误

The type 'System.Windows.Markup.IAddChild' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The type 'System.Windows.IInputElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'.

The type 'System.Windows.ContentElement' is defined in an assembly that is not referenced. You must add a reference to assembly 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'



我不明白这个。我应该怎么做才能纠正这个错误?

请帮我

最佳答案

添加对 PresentationCore DLL 的引用,该引用也在 GAC 中并且是必需的。

布赖恩

关于c# - vs2010/c#中的表命名空间错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5461865/

相关文章:

c# - 改进 WPF 可视层中的 HitTest

visual-studio - 通过 WSDL 添加对 Visual Studio 的服务引用时出错

xml - 在具有命名空间的函数中查询 XML 数据

php - 如何从 Laravel 4 中的替代目录加载 View

c# - .NET Core WebAPI 依赖注入(inject)解析 null

c# - .NET 3rd 方库中是否有任何并发​​队列类型?

c# - 我如何唯一地识别*不是* VPN 连接的网络连接?

c++ - Visual Studio 10中使用/MT或/MD构建dll

visual-studio-2010 - 如何使用 MEF 为 VS2010 编写插件?

c++ - VS2010不理解自己文件的字符串编码