Version

Adding xamColorPicker to Your Page

Before You Begin

The xamColorPicker™ control is a simple editor control that allows your end users to select a color value from a pre-defined palette of colors.

What You Will Accomplish

This topic will demonstrate how to add a xamColorPicker control to your page using XAML and procedural code.

Follow These Steps

  1. Create a WPF project.

  1. In the Solution Explorer, add the following references to your project:

    1. InfragisticsWPF.dll

    2. InfragisticsWPF.Controls.Editors.XamColorPicker.dll

    3. InfragisticsWPF.Controls.Editors.XamSlider.dll

  1. Add the following namespace declarations for xamColorPicker:

    In XAML:

    xmlns:ig="http://schemas.infragistics.com/xaml"

    In Visual Basic:

    Imports Infragistics.Controls.Editors

    In C#:

    using Infragistics.Controls.Editors;
  1. Add a xamColorPicker control to your page. Set the following properties:

    1. X:Name – MyColorPicker

    2. DerivedPalettesCount – 5

    3. SelectedColor – Black

    4. Width – 100

    5. Height – 20

    In XAML:

    <ig:XamColorPicker x:Name="MyColorPicker"
                       DerivedPalettesCount="10"
                       Width="100" Height="20" SelectedColor="Black">
    </ig:XamColorPicker>

    In Visual Basic:

    Dim MyColorPicker As New XamColorPicker()
    MyColorPicker.DerivedPalettesCount = 10
    MyColorPicker.Width = 100
    MyColorPicker.Height = 20
    MyColorPicker.SelectedColor = Colors.Black

    In C#:

    XamColorPicker MyColorPicker = new XamColorPicker();
    MyColorPicker.DerivedPalettesCount = 10;
    MyColorPicker.Width = 100;
    MyColorPicker.Height = 20;
    MyColorPicker.SelectedColor = Colors.Black;
  1. Save and run your application.

    xamColorPicker About xamColorPicker 01.png