Control from WPFToolkit doesn't exist in namespace
Asked Answered
E

7

16

I added to references WPFToolkit.dll and I added do my .xaml file following line:

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

and before following line:

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

In both cases in line

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

I have error:

Error 1 The tag 'NumericUpDown' does not exist in XML namespace 'http://schemas.microsoft.com/wpf/2008/toolkit'. Line 20 Position 18. C:\Users\Diament\Documents\Visual Studio 2008\Projects\MyBasicFlyffKeystroke\MyBasicFlyffKeystroke\Window.xaml 20 18 MyBasicFlyffKeystroke

Where is the problem? :(

Elroyels answered 2/7, 2012 at 17:34 Comment(3)
It looks like NumericUpDown is obsolete. From: wpftoolkit.codeplex.com/wikipage?title=NumericUpDown. "[OBSOLETE] - Please use one of the new DecimalUpDown, DoubleUpDown, or IntegerUpDown controls"Foehn
With IntegerUpDown I have same errorElroyels
Did you ever get this issue figured out?Francisco
Z
9

I had the exact same problem.

If I skipped the unblock step and simply unzipped, the xaml preview window would not load and VS would keep giving me the 'IntegerUpDown component does not exist in the namespace http://schemas.xceed.com/wpf/xaml/toolkit' error, even though auto-complete would happily list all the components in that namespace.

However if I unblock the zip file first, then extract, then reference the dll in VS, it all works correctly.

TL;DR: follow the installation instructions exactly, particularly unblocking the zip file first.

Zajac answered 9/12, 2015 at 11:5 Comment(0)
H
5

NumericUpDown is not part of the basic WPF Toolkit but part of the Extended WPF Toolkit

Use the IntegerUpDown (or any of the provided derived classes) and be sure to use the appropriate DLL in your application. Here is an example using the IntegerUpDown when the Extended WPF Toolkit DLL (Xceed.Wpf.Toolkit.Dll) is referenced by your project:

<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>
Hatband answered 20/2, 2013 at 17:38 Comment(0)
B
2

try

xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
Blackmarket answered 2/7, 2012 at 22:55 Comment(2)
did you by any chance rename the dll? it should be WPFToolkit.Extended.dllBlackmarket
I didn't rename it. I just wrote my own control. Thank you.Elroyels
A
2

I've followed @Andrew suggestion (download, unblock, extract, add), but still had the same issue.

Instead, the install through the NUGET (follow the instructions on their page here) made it work without the need to do the manual steps.

Go go nuget ...

Argus answered 23/4, 2016 at 8:38 Comment(0)
C
2

http://wpftoolkit.codeplex.com/documentation

Installation and Usage Instructions

Please note: The Extended WPF Toolkit is dependent on .NET Framework 4.0. You must install .NET Framework 4.0 in order to use any features in the Toolkit.

Instructions for using the Extended WPF Toolkit binaries:

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 

Installation using 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 
Cymophane answered 14/10, 2016 at 20:11 Comment(1)
I followed "Installation using NuGet". All I did was ran the command "Install-Package Extended.Wpf.Toolkit" in the console and it fixed the 'The name "DataGrid" does not exist in the namespace "clr-namespace:Microsoft.Windows.Controls;assembly=WpfToolkit"'Comfortable
N
2

I have Found the same Error. You have to uninstall current install toolkit and reinstall toolkit it will solve the error.Its not a proper solution but you are able to continue you work.

Noblesse answered 25/4, 2017 at 6:28 Comment(1)
Worked for me. Did install / uninstall via package manager for project.Unfasten
V
0

Note: Consider the Extended WPF Toolkit - Numeric Up Down, is obsolete. And they strongly suggest to use any of "specialized" versions. This, by the way, shouldn't generate an Error, but Warning.

What about not finding the assembly, check your project's and Wpf Toolkit versions compatibility.

Valerle answered 2/7, 2012 at 17:40 Comment(4)
I tried to use IntegerUpDown and I have same error. I have version 3.5.40128.1, from page wpf.codeplex.com/releases/view/40535 (for .NET Framework 3.5)Elroyels
and what is your project's version ?Valerle
But I haven't sp 1... Can be it reason?Elroyels
I also... But I will try... So we haven't more ideas.Elroyels

© 2022 - 2024 — McMap. All rights reserved.