我在我的项目中添加了一个表格,它是这样的:
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/