【发布时间】:2011-07-24 15:05:19
【问题描述】:
我在我的项目中添加了一个表格,大致如下:
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 个错误
“System.Windows.Markup.IAddChild”类型在未引用的程序集中定义。您必须添加对程序集“PresentationCore,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”的引用。
“System.Windows.IInputElement”类型是在未引用的程序集中定义的。您必须添加对程序集“PresentationCore,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35”的引用。
“System.Windows.ContentElement”类型是在未引用的程序集中定义的。您必须添加对程序集 'PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' 的引用
我不明白这一点。我应该怎么做才能纠正这个错误?
请帮帮我
【问题讨论】:
-
你有 ASP.NET 作为标签,但这不是 WPF/Silverlight 的问题吗?
-
相应地更改了标题和标签!感谢指出错误
标签: c# visual-studio-2010 namespaces