xmlns:ig="http://schemas.infragistics.com/xaml"
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.
This topic will demonstrate how to add a xamColorPicker control to your page using XAML and procedural code.
Create a WPF project.
Add the following NuGet package to your application:
Infragistics.WPF.ColorPicker
For more information on setting up the NuGet feed and adding NuGet packages, you can take a look at the following documentation: NuGet Feeds.
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;
Add a xamColorPicker control to your page. Set the following properties:
X:Name – MyColorPicker
SelectedColor – Black
Width – 100
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;
Save and run your application.