简体   繁体   中英

How do I make the Extended WPF Toolkit ColorPicker work?

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.

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.

在此输入图像描述

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/"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM