Class
RadColorEditor

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:

cs-api-definition
[TelerikToolboxCategory("Input")]
[Themable]
public class RadColorEditor : Control

Inheritance: objectRadColorEditor

Constructors

RadColorEditor()

Initializes a new instance of the RadColorEditor class.

Declaration

cs-api-definition
public RadColorEditor()

Fields

ActiveSectionsProperty

Identifies the ActiveSections dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ActiveSectionsProperty

Field Value

DependencyProperty

AlphaSettingsVisibilityProperty

Identifies the AlphaSettingsVisibility dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty AlphaSettingsVisibilityProperty

Field Value

DependencyProperty

ColorModeChangedEvent

Identifies the ColorModeChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent ColorModeChangedEvent

Field Value

RoutedEvent

ColorModeProperty

Identifies the ColorMode dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ColorModeProperty

Field Value

DependencyProperty

ColorSettingsPanelWidthProperty

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

Declaration

cs-api-definition
public static readonly DependencyProperty ColorSettingsPanelWidthProperty

Field Value

DependencyProperty

HistoryCapacityProperty

Identifies the HistoryCapacity dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty HistoryCapacityProperty

Field Value

DependencyProperty

HistoryChangedEvent

Identifies the HistoryChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent HistoryChangedEvent

Field Value

RoutedEvent

InitialColorProperty

Identifies the InitialColor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty InitialColorProperty

Field Value

DependencyProperty

PreviousColorChangedEvent

Identifies the PreviousColorChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent PreviousColorChangedEvent

Field Value

RoutedEvent

PreviousColorProperty

Identifies the PreviousColor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty PreviousColorProperty

Field Value

DependencyProperty

SelectedColorChangedEvent

Identifies the SelectedColorChanged routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SelectedColorChangedEvent

Field Value

RoutedEvent

SelectedColorChangingEvent

Identifies the SelectedColorChanging routed event.

Declaration

cs-api-definition
public static readonly RoutedEvent SelectedColorChangingEvent

Field Value

RoutedEvent

SelectedColorProperty

Identifies the SelectedColor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty SelectedColorProperty

Field Value

DependencyProperty

UnifiedColorProperty

Identifies the UnifiedColor dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty UnifiedColorProperty

Field Value

DependencyProperty

ViewModelProperty

Identifies the ViewModel dependency property.

Declaration

cs-api-definition
public static readonly DependencyProperty ViewModelProperty

Field Value

DependencyProperty

Properties

ActiveSections

Gets or sets the active sections.

Declaration

cs-api-definition
public ActiveSectionTypes ActiveSections { get; set; }

Property Value

ActiveSectionTypes

AlphaSettingsVisibility

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

Declaration

cs-api-definition
public Visibility AlphaSettingsVisibility { get; set; }

Property Value

Visibility

ColorConverter

Gets or sets the color converter used by RadColorEditor.

Declaration

cs-api-definition
public static ColorConverter ColorConverter { get; set; }

Property Value

ColorConverter

The color converter.

ColorHistory

Provides a collection of previously selected colors.

Declaration

cs-api-definition
public ObservableCollection<Color> ColorHistory { get; }

Property Value

ObservableCollection<Color>

ColorMode

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

Declaration

cs-api-definition
public ColorMode ColorMode { get; set; }

Property Value

ColorMode

ColorSettingsPanelWidth

Gets or sets the color settings panel width.

Declaration

cs-api-definition
public double ColorSettingsPanelWidth { get; set; }

Property Value

double

HistoryCapacity

Gets or sets the HistoryCapacity property.

Declaration

cs-api-definition
public int HistoryCapacity { get; set; }

Property Value

int

InitialColor

Gets or sets the initial color.

Declaration

cs-api-definition
public Color InitialColor { get; set; }

Property Value

Color

PreviousColor

Gets or sets the previously used color.

Declaration

cs-api-definition
public Color PreviousColor { get; set; }

Property Value

Color

SelectedColor

Gets or sets the currently selected color.

Declaration

cs-api-definition
public Color SelectedColor { get; set; }

Property Value

Color

UnifiedColor

Gets or sets the UnifiedColor property.

Declaration

cs-api-definition
public UnifiedColor UnifiedColor { get; set; }

Property Value

UnifiedColor

ViewModel

Gets or sets the view model.

Declaration

cs-api-definition
public UnifiedColorViewModel ViewModel { get; }

Property Value

UnifiedColorViewModel

The view model.

Methods

AddToHistory(Color)

Adds a Color to RadColorEditor's color history.

Declaration

cs-api-definition
protected virtual void AddToHistory(Color color)

Parameters

color

Color

ChangeVisualState()

Changes the visual state of the control using transitions.

Declaration

cs-api-definition
protected virtual void ChangeVisualState()

ChangeVisualState(bool)

Updates the visual state of the control.

Declaration

cs-api-definition
protected virtual void ChangeVisualState(bool useTransitions)

Parameters

useTransitions

bool

Indicates whether transitions should be used.

OnApplyTemplate()

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.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Maintainability", "CA1502:AvoidExcessiveComplexity")]
public override void OnApplyTemplate()

OnColorModeChanged(ColorMode, ColorMode)

Called when the ColorMode property changes.

Declaration

cs-api-definition
protected virtual void OnColorModeChanged(ColorMode oldValue, ColorMode newValue)

Parameters

oldValue

ColorMode

newValue

ColorMode

OnCreateAutomationPeer()

Declaration

cs-api-definition
protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer

OnHistoryCapacityChanged(int, int)

PropertyChanged callback for the HistoryCapacity property.

Declaration

cs-api-definition
protected virtual void OnHistoryCapacityChanged(int oldValue, int newValue)

Parameters

oldValue

int

newValue

int

OnInitialized(EventArgs)

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

Declaration

cs-api-definition
protected override void OnInitialized(EventArgs e)

Parameters

e

EventArgs

The RoutedEventArgs that contains the event data.

OnPreviousColorChanged(Color, Color)

Called when the PreviousColor property changes.

Declaration

cs-api-definition
protected virtual void OnPreviousColorChanged(Color oldValue, Color newValue)

Parameters

oldValue

Color

newValue

Color

OnSelectedColorChanged(Color, Color)

Called when the SelectedColor property changes.

Declaration

cs-api-definition
protected virtual void OnSelectedColorChanged(Color oldValue, Color newValue)

Parameters

oldValue

Color

newValue

Color

OnUnifiedColorChanged(UnifiedColor, UnifiedColor)

Called when the UnifiedColor property changes.

Declaration

cs-api-definition
protected virtual void OnUnifiedColorChanged(UnifiedColor oldValue, UnifiedColor newValue)

Parameters

oldValue

UnifiedColor

newValue

UnifiedColor

RaiseColorModeChanged(ColorMode, ColorMode)

Raises the ColorModeChanged event.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
protected virtual void RaiseColorModeChanged(ColorMode oldValue, ColorMode newValue)

Parameters

oldValue

ColorMode

The old ColorMode value.

newValue

ColorMode

The new ColorMode value.

RaiseHistoryChanged(IList<Color>, IList<Color>)

Raises the HistoryChanged event.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
protected virtual void RaiseHistoryChanged(IList<Color> removedItems, IList<Color> addedItems)

Parameters

removedItems

IList<Color>

The removed items.

addedItems

IList<Color>

The added items.

RaisePreviousColorChanged(Color)

Raises the SelectedColorChanging event.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
protected virtual void RaisePreviousColorChanged(Color color)

Parameters

color

Color

The selected color.

RaiseSelectedColorChanged(Color)

Raises the SelectedColorChanged event.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
protected virtual void RaiseSelectedColorChanged(Color color)

Parameters

color

Color

The selected color.

RaiseSelectedColorChanging(Color)

Raises the SelectedColorChanging event.

Declaration

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1030:UseEventsWhereAppropriate")]
protected virtual void RaiseSelectedColorChanging(Color color)

Parameters

color

Color

The selected color.

ResetTheme()

Resets the theme.

Declaration

cs-api-definition
public void ResetTheme()

Events

ColorModeChanged

Occurs when the ColorMode property changes.

Declaration

cs-api-definition
public event EventHandler<ColorModeEventArgs> ColorModeChanged

Event Value

EventHandler<ColorModeEventArgs>

HistoryChanged

Occurs when ColorHistory property changes.

Declaration

cs-api-definition
public event EventHandler<HistoryChangedEventArgs> HistoryChanged

Event Value

EventHandler<HistoryChangedEventArgs>

PreviousColorChanged

Occurs when the PreviousColor property has changed its value.

Declaration

cs-api-definition
public event EventHandler<ColorChangeEventArgs> PreviousColorChanged

Event Value

EventHandler<ColorChangeEventArgs>

SelectedColorChanged

Occurs when the SelectedColor property has changed its value.

Declaration

cs-api-definition
public event EventHandler<ColorChangeEventArgs> SelectedColorChanged

Event Value

EventHandler<ColorChangeEventArgs>

SelectedColorChanging

Occurs when the SelectedColor property is changing its value.

Declaration

cs-api-definition
public event EventHandler<ColorChangeEventArgs> SelectedColorChanging

Event Value

EventHandler<ColorChangeEventArgs>