命名空间中不存在来自WPFToolkit的控制

我添加了参考WPFToolkit.dll,我添加了以下行的.xaml文件:

xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit" 

在跟随之前:

 xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit" 

在两种情况下都符合要求

  

我有错误:

错误1 XML名称空间“http://schemas.microsoft.com/wpf/2008/toolkit”中不存在标记“NumericUpDown”。 第20行位置18. C:\ Users \ Diament \ Documents \ Visual Studio 2008 \ Projects \ MyBasicFlyffKeystroke \ MyBasicFlyffKeystroke \ Window.xaml 20 18 MyBasicFlyffKeystroke

问题出在哪儿? 🙁

我有同样的问题。

如果我跳过 unblock步骤并且只是解压缩,xaml预览窗口将无法加载,VS将继续给我’名称空间http://schemas.xceed.com/wpf/xaml/toolkit ‘中不存在’IntegerUpDown组件’错误即使auto-complete会愉快地列出该命名空间中的所有组件。

但是,如果我先解锁 zip文件,然后解压缩,然后在VS中引用dll,一切正常。

TL; DR: 完全按照安装说明进行操作 ,特别是先解锁 zip文件。

NumericUpDown不是基本WPF工具包的一部分,而是扩展WPF工具包的一部分

使用IntegerUpDown(或任何提供的派生类 )并确保在应用程序中使用适当的DLL。 以下是在项目引用Extended WPF Toolkit DLL( Xceed.Wpf.Toolkit.Dll )时使用IntegerUpDown的示例:

      

我已经关注@Andrew建议(下载,解锁,提取,添加),但仍然有同样的问题。

相反,通过NUGET进行安装(按照其页面上的说明进行操作)使其无需执行手动步骤即可运行。

去吧……

我发现了同样的错误。 你必须卸载当前的安装工具包并重新安装工具包它将解决错误。它不是一个合适的解决方案,但你能够继续你的工作。

尝试

 xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit" 

http://wpftoolkit.codeplex.com/documentation

安装和使用说明

请注意:Extended WPF Toolkit依赖于.NET Framework 4.0。 您必须安装.NET Framework 4.0才能使用Toolkit中的任何function。

使用Extended WPF Toolkit二进制文件的说明:

 1.Install .NET Framework 4.0. 2.Download the ExtendedWPFToolkit_Binaries 3.Unblock the ZIP file. 1.Right-click ExtendedWPFToolkit_Binaries.zip -> Properties -> Unblock 4.Unzip the ExtendedWPFToolkit_Binaries.zip 5.Reference the binaries in your project: 1.Reference WPFToolkit.Extended.dll in your project (Xceed.Wpf.DataGrid.dll for the datagrid control) 2.Add a using statement ("using Xceed.Wpf.Toolkit;" for most of the controls, "using Xceed.Wpf.DataGrid;" for the datagrid control) to the top of .cs files 3.Add a new xmlns (xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" for most of the controls, xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" for the datagrid control) to the top of XAML files 4.Remember to use the namespace prefix (in the above example,  or ) in the body of your XAML 

使用NuGet进行安装

 1.Install NuGet (can be downloaded for this link: https://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c). 2.Open your Visual Studio. 3.Open your solution/project. 4.Open Tools menu, select Library Package Manager and select Package Manager Console 5.Run the following command Install-Package Extended.Wpf.Toolkit 1.Add a using statement ("using Xceed.Wpf.Toolkit;" for most of the controls, "using Xceed.Wpf.DataGrid;" for the datagrid control) to the top of .cs files 2.Add a new xmlns (xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" for most of the controls, xmlns:xcdg="http://schemas.xceed.com/wpf/xaml/datagrid" for the datagrid control) to the top of XAML files 3.Remember to use the namespace prefix (in the above example,  or ) in the body of your XAML 

注意:考虑扩展WPF工具包 – 数字向上 ,已过时。 他们强烈建议使用任何“专业”版本。 顺便说一下,这不应该生成错误 ,而是警告

如何找不到程序集,检查项目和Wpf Toolkit版本的兼容性。