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