Infragistics(R) NetAdvantage(R) : WPF 2012.1
Adding xamColorPicker to Your Page
E-mail your feedback on this topic.
Shared XAML > Editors > xamColorPicker > Adding xamColorPicker to Your Page

Glossary Item Box

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.
  2. In the Solution Explorer, add the following references to your project:
    1. InfragisticsWPF4.v12.1.dll
    2. InfragisticsWPF4.Controls.Editors.v12.1.dll
    3. InfragisticsWPF4.Controls.Editors.XamSlider.v12.1.dll
  3. Add the following namespace declarations for xamColorPicker:

    In XAML:


    In Visual Basic:

    Imports Infragistics.Controls.Editors

    In C#:

    using Infragistics.Controls.Editors;
  4. 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"  
                       Width="100" Height="20" SelectedColor="Black">

    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;
  5. Save and run your application.