Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/wpf/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 来自WPFToolkit的控件不';名称空间中不存在_C#_Wpf_.net 3.5 - Fatal编程技术网

C# 来自WPFToolkit的控件不';名称空间中不存在

C# 来自WPFToolkit的控件不';名称空间中不存在,c#,wpf,.net-3.5,C#,Wpf,.net 3.5,我添加了对WPFToolkit.dll的引用,并在下面一行添加了do my.xaml文件: xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit" xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit" 在下一行之前: xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls

我添加了对WPFToolkit.dll的引用,并在下面一行添加了do my.xaml文件:

xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit"
xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
在下一行之前:

xmlns:toolkit="clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit"
xmlns:toolkit="http://schemas.microsoft.com/wpf/2008/toolkit"
在这两种情况下都是一致的

<toolkit:NumericUpDown Value="10" Increment="1" Maximum="10" Minimum="0" />

我有一个错误:

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

问题出在哪里(

注释:考虑一下,已经过时了。 他们强烈建议使用任何“专用”版本。顺便说一句,不应该产生错误,而是警告

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

试试

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

NumericUpDown不是的一部分,而是的一部分

使用IntegerUpDown(或其中任何一个),并确保在应用程序中使用适当的DLL。以下是当项目引用扩展WPF Toolkit DLL(Xceed.WPF.Toolkit.DLL)时使用IntegerUpDown的示例:

<Window x:Class="WpfApplication4.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
        Title="Window1" Height="300" Width="300">
    <Grid>
      <toolkit:IntegerUpDown Value="10" Increment="1" Minimum="0" Maximum="10" />
   </Grid>
</Window>

我也有同样的问题

如果我跳过取消阻止步骤并简单地解压,xaml预览窗口将不会加载,VS将继续给我“IntegerUpDown组件在名称空间中不存在”错误,即使auto complete将愉快地列出该名称空间中的所有组件

但是,如果我先解除阻止zip文件,然后提取,然后引用VS中的dll,那么一切都正常工作


TL;DR:严格遵循,尤其是先解除阻止
zip文件。

我遵循了@Andrew建议(下载、解除阻止、提取、添加),但仍然存在同样的问题

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

快走快走…

安装和使用说明

请注意:扩展WPF工具包依赖于.NET Framework 4.0。您必须安装.NET Framework 4.0才能使用工具包中的任何功能

使用扩展WPF工具包二进制文件的说明:

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, <xctk: ...> or <xcdg: ...>) in the body of your XAML 
1.0安装.NET Framework 4.0。
2.下载扩展的WPFToolkit_二进制文件
3.取消阻止ZIP文件。1.右键单击ExtendedWPFToolkit_Binaries.ZIP->Properties->Unblock
4.解压缩扩展的wpftoolkit_Binaries.zip
5.参考项目中的二进制文件:
1.在项目中引用WPFToolkit.Extended.dll(DataGrid控件的Xceed.Wpf.DataGrid.dll)
2.将using语句(“using Xceed.Wpf.Toolkit;”对于大多数控件,“using Xceed.Wpf.DataGrid;”对于DataGrid控件)添加到.cs文件的顶部
3.添加新的xmlns(xmlns:xctk=”http://schemas.xceed.com/wpf/xaml/toolkit“对于大多数控件,xmlns:xcdg=”http://schemas.xceed.com/wpf/xaml/datagrid“对于datagrid控件)添加到XAML文件的顶部
4.记住在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, <xctk: ...> or <xcdg: ...>) in the body of your XAML 
1.Install NuGet(可下载此链接:https://visualstudiogallery.msdn.microsoft.com/27077b70-9dad-4c64-adcf-c7cf6bc9970c). 
2.打开Visual Studio。
3.打开您的解决方案/项目。
4.打开工具菜单,选择Library Package Manager并选择Package Manager Console
5.运行以下命令Install Package Extended.Wpf.Toolkit
1.将using语句(“using Xceed.Wpf.Toolkit;”对于大多数控件,“using Xceed.Wpf.DataGrid;”对于DataGrid控件)添加到.cs文件的顶部
2.添加新的xmlns(xmlns:xctk=”http://schemas.xceed.com/wpf/xaml/toolkit“对于大多数控件,xmlns:xcdg=”http://schemas.xceed.com/wpf/xaml/datagrid“对于datagrid控件)添加到XAML文件的顶部
3.记住在XAML的主体中使用名称空间前缀(在上面的示例中,或)

我发现了相同的错误。您必须卸载当前的安装工具包,然后重新安装工具包它将解决错误。这不是一个正确的解决方案,但您可以继续工作。

看起来
数字上下
已经过时。发件人:“[过时]-请使用新的DecimalUpDown、DoubleUpDown或IntegerUpDown控件之一“与IntegerUpDown我有相同的错误您解决过这个问题吗?我尝试使用IntegerUpDown,但我有相同的错误。我有第页的版本3.5.40128.1(适用于.NET Framework 3.5)你的项目版本是什么?但我没有sp 1…这是原因吗?我也…但我会尝试…所以我们没有更多的想法。你有没有重命名dll?它应该是WPFToolkit.Extended.dllI没有重命名。我只是写了我自己的控件。谢谢。为我工作。通过项目包管理器安装/卸载了。我遵循了“使用NuGet安装”。我所做的只是在控制台中运行命令“Install Package Extended.Wpf.Toolkit”,它修复了名称空间“clr namespace:Microsoft.Windows.Controls;assembly=WpfToolkit”中不存在的“名称”DataGrid