Edit this page

Getting Started

This article will help you get started with the Telerik RadColorEditor control

Selection

The RadColorEditor is a control that displays a custom palette from which users can select a single color.

In order to use the RadColorEditor in your projects you have to add references to the following assemblies:

  • Telerik.Windows.Controls
  • Telerik.Windows.Controls.Input

You can find more info here.

The control exposes a SelectedColor property, which is of type Color and is used to store the selected color value.

XAML

<telerik:RadColorEditor SelectedColor="Red" />

C#

RadColorEditor colorEditor = new RadColorEditor();
colorEditor.SelectedColor = Colors.Red;

VB.NET

Dim colorEditor As New RadColorEditor()
colorEditor.SelectedColor = Colors.Red

Whenever a color is selected the SelectedColorChanged event is raised:

XAML

<telerik:RadColorEditor x:Name="colorEditor" SelectedColorChanged="colorEditor_SelectedColorChanged " />

C#

colorEditor.SelectedColorChanged += new EventHandler<ColorChangeEventArgs>(colorEditor_SelectedColorChanged);

private void colorEditor1_SelectedColorChanged(object sender, ColorChangeEventArgs e)
{
   Color selectedColor = e.Color;
}

VB.NET

colorEditor.SelectedColorChanged += New EventHandler(Of ColorChangeEventArgs)(colorEditor_SelectedColorChanged)

Private Sub colorEditor1_SelectedColorChanged(ByVal sender As Object, ByVal e As ColorChangeEventArgs)
    Dim selectedColor As Color = e.Color
End Sub

See Also