10
votes

I would like to be able to use this color picker in my application:

http://wpftoolkit.codeplex.com/wikipage?title=ColorPicker&referringTitle=Documentation

I'm using Visual Studio 2010 Ultimate with .NET 4 installed. I'm coding in C# and WPF (XAML).

What I've done so far:

  1. Downloaded and unzipped WPFToolkit.Extended.dll
  2. Added a reference to it in Visual Studio (can I verify this somehow?)
  3. Added this line to MainWindow.xaml.cs: using Xceed.Wpf.Toolkit;
  4. Added the bold line to MainWindow.xaml:

    < Window x:Class="TDDD49Task2.ColorWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit/" [...]>

  5. Tried to use < xctk:ColorPicker> in MainWindow.xaml (Error message: "The type 'xctk:ColorPicker' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.").

  6. Googled for a solution, tutorial or example without much success.

Please explain how the Extended WPF Toolkit is used or point me in the right direction.

2

2 Answers

11
votes

Its worked for me though but the namespace you included is incorrect. Remove the last backslash at the end. It should be -

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

instead of

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

This error occur also when you don't unblock the assembly.

Below is short instruction to this:

  1. Right click on the "WPFToolkit.Extended.dll".
  2. Click Unblock in the Security section.

enter image description here