New to Telerik UI for WPFStart a free 30-day trial

The RadColorEditor control is an editor that allows you to select a custom color. It supports several color schemas: RGB, HLS, HSV, CMYK and HEX.

Definition

Namespace:Telerik.Windows.Controls

Assembly:Telerik.Windows.Controls.Input.dll

Syntax:

C#
[TelerikToolboxCategory("Input")]
[Themable]
public class RadColorEditor : Control

Inheritance: objectRadColorEditor

Constructors

Initializes a new instance of the RadColorEditor class.

C#
public RadColorEditor()

Fields

ActiveSectionsProperty

DependencyProperty

Identifies the ActiveSections dependency property.

C#
public static readonly DependencyProperty ActiveSectionsProperty

Identifies the AlphaSettingsVisibility dependency property.

C#
public static readonly DependencyProperty AlphaSettingsVisibilityProperty

Identifies the ColorModeChanged routed event.

C#
public static readonly RoutedEvent ColorModeChangedEvent

ColorModeProperty

DependencyProperty

Identifies the ColorMode dependency property.

C#
public static readonly DependencyProperty ColorModeProperty

Identifies the Telerik.Windows.Controls.RadColorEditor.ColorSettingsPanelWidth dependency property.

C#
public static readonly DependencyProperty ColorSettingsPanelWidthProperty

HistoryCapacityProperty

DependencyProperty

Identifies the HistoryCapacity dependency property.

C#
public static readonly DependencyProperty HistoryCapacityProperty

Identifies the HistoryChanged routed event.

C#
public static readonly RoutedEvent HistoryChangedEvent

InitialColorProperty

DependencyProperty

Identifies the InitialColor dependency property.

C#
public static readonly DependencyProperty InitialColorProperty

Identifies the PreviousColorChanged routed event.

C#
public static readonly RoutedEvent PreviousColorChangedEvent

PreviousColorProperty

DependencyProperty

Identifies the PreviousColor dependency property.

C#
public static readonly DependencyProperty PreviousColorProperty

Identifies the SelectedColorChanged routed event.

C#
public static readonly RoutedEvent SelectedColorChangedEvent

Identifies the SelectedColorChanging routed event.

C#
public static readonly RoutedEvent SelectedColorChangingEvent

SelectedColorProperty

DependencyProperty

Identifies the SelectedColor dependency property.

C#
public static readonly DependencyProperty SelectedColorProperty

UnifiedColorProperty

DependencyProperty

Identifies the UnifiedColor dependency property.

C#
public static readonly DependencyProperty UnifiedColorProperty

ViewModelProperty

DependencyProperty

Identifies the ViewModel dependency property.

C#
public static readonly DependencyProperty ViewModelProperty

Properties

Gets or sets the active sections.

C#
public ActiveSectionTypes ActiveSections { get; set; }

Gets or sets the AlphaSettingsVisibility. Hides or shows the Alpha Channel TextBox and Slider.

C#
public Visibility AlphaSettingsVisibility { get; set; }

Gets or sets the color converter used by RadColorEditor.

C#
public static ColorConverter ColorConverter { get; set; }
Property Value:

The color converter.

Provides a collection of previously selected colors.

C#
public ObservableCollection<Color> ColorHistory { get; }

Gets or sets the ColorMode property. The ColorMode property determines which will be the current color scheme - RGB, HLS, HSV or CMYK.

C#
public ColorMode ColorMode { get; set; }

Gets or sets the color settings panel width.

C#
public double ColorSettingsPanelWidth { get; set; }

Gets or sets the HistoryCapacity property.

C#
public int HistoryCapacity { get; set; }

Gets or sets the initial color.

C#
public Color InitialColor { get; set; }

Gets or sets the previously used color.

C#
public Color PreviousColor { get; set; }

Gets or sets the currently selected color.

C#
public Color SelectedColor { get; set; }

Gets or sets the UnifiedColor property.

C#
public UnifiedColor UnifiedColor { get; set; }

Gets or sets the view model.

C#
public UnifiedColorViewModel ViewModel { get; }
Property Value:

The view model.

Methods

Adds a Color to RadColorEditor's color history.

C#
protected virtual void AddToHistory(Color color)
Parameters:colorColor

Changes the visual state of the control using transitions.

C#
protected virtual void ChangeVisualState()

Updates the visual state of the control.

C#
protected virtual void ChangeVisualState(bool useTransitions)
Parameters:useTransitionsbool

Indicates whether transitions should be used.

When overridden in a derived class, is invoked whenever application code or internal processes (such as a rebuilding layout pass) call . In simplest terms, this means the method is called just before a UI element displays in an application. For more information, see Remarks.

C#
public override void OnApplyTemplate()

Called when the ColorMode property changes.

C#
protected virtual void OnColorModeChanged(ColorMode oldValue, ColorMode newValue)
Parameters:oldValueColorModenewValueColorMode
C#
protected override AutomationPeer OnCreateAutomationPeer()
Returns:

AutomationPeer

PropertyChanged callback for the HistoryCapacity property.

C#
protected virtual void OnHistoryCapacityChanged(int oldValue, int newValue)
Parameters:oldValueintnewValueint

Raises the event. This method is invoked whenever is set to true internally.

C#
protected override void OnInitialized(EventArgs e)
Parameters:eEventArgs

The RoutedEventArgs that contains the event data.

Called when the PreviousColor property changes.

C#
protected virtual void OnPreviousColorChanged(Color oldValue, Color newValue)
Parameters:oldValueColornewValueColor

Called when the SelectedColor property changes.

C#
protected virtual void OnSelectedColorChanged(Color oldValue, Color newValue)
Parameters:oldValueColornewValueColor

Called when the UnifiedColor property changes.

C#
protected virtual void OnUnifiedColorChanged(UnifiedColor oldValue, UnifiedColor newValue)
Parameters:oldValueUnifiedColornewValueUnifiedColor

Raises the ColorModeChanged event.

C#
protected virtual void RaiseColorModeChanged(ColorMode oldValue, ColorMode newValue)
Parameters:oldValueColorMode

The old ColorMode value.

newValueColorMode

The new ColorMode value.

Raises the HistoryChanged event.

C#
protected virtual void RaiseHistoryChanged(IList<Color> removedItems, IList<Color> addedItems)
Parameters:removedItemsIList<Color>

The removed items.

addedItemsIList<Color>

The added items.

Raises the SelectedColorChanging event.

C#
protected virtual void RaisePreviousColorChanged(Color color)
Parameters:colorColor

The selected color.

Raises the SelectedColorChanged event.

C#
protected virtual void RaiseSelectedColorChanged(Color color)
Parameters:colorColor

The selected color.

Raises the SelectedColorChanging event.

C#
protected virtual void RaiseSelectedColorChanging(Color color)
Parameters:colorColor

The selected color.

Resets the theme.

C#
public void ResetTheme()

Events

Occurs when the ColorMode property changes.

C#
public event EventHandler<ColorModeEventArgs> ColorModeChanged

Occurs when ColorHistory property changes.

C#
public event EventHandler<HistoryChangedEventArgs> HistoryChanged

Occurs when the PreviousColor property has changed its value.

C#
public event EventHandler<ColorChangeEventArgs> PreviousColorChanged

Occurs when the SelectedColor property has changed its value.

C#
public event EventHandler<ColorChangeEventArgs> SelectedColorChanged

Occurs when the SelectedColor property is changing its value.

C#
public event EventHandler<ColorChangeEventArgs> SelectedColorChanging