Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Control from WPFToolkit doesn't exist in namespace

Tags:

c#

.net-3.5

wpf

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

like image 480
cadi2108 Avatar asked Jul 02 '12 17:07

cadi2108


3 Answers

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.

like image 110
andrew-g-za Avatar answered Nov 01 '22 19:11

andrew-g-za


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>
like image 5
NoNameStackExchange Avatar answered Nov 01 '22 20:11

NoNameStackExchange


try

xmlns:toolkit="http://schemas.xceed.com/wpf/xaml/toolkit"
like image 2
cppanda Avatar answered Nov 01 '22 18:11

cppanda