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:
[TelerikToolboxCategory("Input")]
[Themable]
public class RadColorEditor : Control
Inheritance: objectRadColorEditor
Constructors
Initializes a new instance of the RadColorEditor class.
public RadColorEditor()
Fields
ActiveSectionsProperty
DependencyProperty
Identifies the ActiveSections dependency property.
public static readonly DependencyProperty ActiveSectionsProperty
AlphaSettingsVisibilityProperty
DependencyProperty
Identifies the AlphaSettingsVisibility dependency property.
public static readonly DependencyProperty AlphaSettingsVisibilityProperty
ColorModeChangedEvent
RoutedEvent
Identifies the ColorModeChanged routed event.
public static readonly RoutedEvent ColorModeChangedEvent
ColorModeProperty
DependencyProperty
Identifies the ColorMode dependency property.
public static readonly DependencyProperty ColorModeProperty
ColorSettingsPanelWidthProperty
DependencyProperty
Identifies the Telerik.Windows.Controls.RadColorEditor.ColorSettingsPanelWidth dependency property.
public static readonly DependencyProperty ColorSettingsPanelWidthProperty
HistoryCapacityProperty
DependencyProperty
Identifies the HistoryCapacity dependency property.
public static readonly DependencyProperty HistoryCapacityProperty
HistoryChangedEvent
RoutedEvent
Identifies the HistoryChanged routed event.
public static readonly RoutedEvent HistoryChangedEvent
InitialColorProperty
DependencyProperty
Identifies the InitialColor dependency property.
public static readonly DependencyProperty InitialColorProperty
PreviousColorChangedEvent
RoutedEvent
Identifies the PreviousColorChanged routed event.
public static readonly RoutedEvent PreviousColorChangedEvent
PreviousColorProperty
DependencyProperty
Identifies the PreviousColor dependency property.
public static readonly DependencyProperty PreviousColorProperty
SelectedColorChangedEvent
RoutedEvent
Identifies the SelectedColorChanged routed event.
public static readonly RoutedEvent SelectedColorChangedEvent
SelectedColorChangingEvent
RoutedEvent
Identifies the SelectedColorChanging routed event.
public static readonly RoutedEvent SelectedColorChangingEvent
SelectedColorProperty
DependencyProperty
Identifies the SelectedColor dependency property.
public static readonly DependencyProperty SelectedColorProperty
UnifiedColorProperty
DependencyProperty
Identifies the UnifiedColor dependency property.
public static readonly DependencyProperty UnifiedColorProperty
ViewModelProperty
DependencyProperty
Identifies the ViewModel dependency property.
public static readonly DependencyProperty ViewModelProperty
Properties
Gets or sets the active sections.
public ActiveSectionTypes ActiveSections { get; set; }
AlphaSettingsVisibility
Visibility
Gets or sets the AlphaSettingsVisibility. Hides or shows the Alpha Channel TextBox and Slider.
public Visibility AlphaSettingsVisibility { get; set; }
Gets or sets the color converter used by RadColorEditor.
public static ColorConverter ColorConverter { get; set; }
The color converter.
Provides a collection of previously selected colors.
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.
public ColorMode ColorMode { get; set; }
Gets or sets the color settings panel width.
public double ColorSettingsPanelWidth { get; set; }
Gets or sets the HistoryCapacity property.
public int HistoryCapacity { get; set; }
InitialColor
Color
Gets or sets the initial color.
public Color InitialColor { get; set; }
PreviousColor
Color
Gets or sets the previously used color.
public Color PreviousColor { get; set; }
SelectedColor
Color
Gets or sets the currently selected color.
public Color SelectedColor { get; set; }
Gets or sets the UnifiedColor property.
public UnifiedColor UnifiedColor { get; set; }
Gets or sets the view model.
public UnifiedColorViewModel ViewModel { get; }
The view model.
Methods
Adds a Color to RadColorEditor's color history.
protected virtual void AddToHistory(Color color)
Changes the visual state of the control using transitions.
protected virtual void ChangeVisualState()
Updates the visual state of the control.
protected virtual void ChangeVisualState(bool useTransitions)
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.
public override void OnApplyTemplate()
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
PropertyChanged callback for the HistoryCapacity property.
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Called when the PreviousColor property changes.
protected virtual void OnPreviousColorChanged(Color oldValue, Color newValue)
Called when the SelectedColor property changes.
protected virtual void OnSelectedColorChanged(Color oldValue, Color newValue)
Called when the UnifiedColor property changes.
protected virtual void OnUnifiedColorChanged(UnifiedColor oldValue, UnifiedColor newValue)
Raises the ColorModeChanged event.
Raises the HistoryChanged event.
Raises the SelectedColorChanging event.
protected virtual void RaisePreviousColorChanged(Color color)
The selected color.
Raises the SelectedColorChanged event.
protected virtual void RaiseSelectedColorChanged(Color color)
The selected color.
Raises the SelectedColorChanging event.
protected virtual void RaiseSelectedColorChanging(Color color)
The selected color.
Resets the theme.
public void ResetTheme()
Events
Occurs when the ColorMode property changes.
public event EventHandler<ColorModeEventArgs> ColorModeChanged
Occurs when ColorHistory property changes.
public event EventHandler<HistoryChangedEventArgs> HistoryChanged
Occurs when the PreviousColor property has changed its value.
public event EventHandler<ColorChangeEventArgs> PreviousColorChanged
Occurs when the SelectedColor property has changed its value.
public event EventHandler<ColorChangeEventArgs> SelectedColorChanged
Occurs when the SelectedColor property is changing its value.
public event EventHandler<ColorChangeEventArgs> SelectedColorChanging