cadi2108
cadi2108

Reputation: 1280

Control from WPFToolkit doesn't exist in namespace

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? :(

Upvotes: 16

Views: 26020

Answers (7)

Ahmad
Ahmad

Reputation: 780

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.

Upvotes: 2

Rusty Nail
Rusty Nail

Reputation: 2710

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 

Upvotes: 2

Noctis
Noctis

Reputation: 11763

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 ...

Upvotes: 2

andrew-g-za
andrew-g-za

Reputation: 987

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.

Upvotes: 9

NoNameStackExchange
NoNameStackExchange

Reputation: 404

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>

Upvotes: 5

cppanda
cppanda

Reputation: 1315

try

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

Upvotes: 2

Tigran
Tigran

Reputation: 62246

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.

Upvotes: 0

Related Questions