VS2008 環境下,已安裝 WPFToolkit 並添加 DLL 引用,但在 C# 代碼中使用 DataGridRow 類時提示缺少命名空間引用。
WPFToolkit 的控件通常位於以下命名空間:
using Microsoft.Windows.Controls; // DataGrid 及相關控件
// 或
using Microsoft.Windows.Controls.Primitives; // DataGridRow 等基元控件
WPFToolkit.dllusing Microsoft.Windows.Controls.Primitives;DataGridRow 所在的確切命名空間WPF 4.0 及以上版本已內建 DataGrid(位於 System.Windows.Controls),若非維護舊專案,建議升級 .NET Framework 版本以使用原生控件,避免第三方庫依賴。