11

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.

CodeMonkey
  • 635
  • 1
  • 7
  • 16

2 Answers2

21

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

kmatyaszek
  • 19,016
  • 9
  • 60
  • 65
  • It may be well over a year later, but your solution was the one that helped me! So a very belated thanks for your answer. – cost Feb 08 '13 at 18:47
11

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/"
Rohit Vats
  • 79,502
  • 12
  • 161
  • 185
  • I tried what you suggested, but I still get the same error message. Could you perhaps paste some more (working) XAML code? I also found the toolkit under References in the Solution Explorer, so I know it's there. Did you do anything else after adding the reference? – CodeMonkey Nov 24 '12 at 13:54
  • Are you getting the error at design time or during compile time? because i am getting the error at design time but when i run the application it works fine. – Rohit Vats Nov 24 '12 at 14:26