Class RadColorBox
Represents a color editor box. The RadColorBox class is a simple wrapper for the RadColorBoxElement class. The RadColorBox acts to transfer events to and from its corresponding RadColorBoxElement. The RadColorBoxElement which is essentially the RadColorBox control may be nested in other telerik controls.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Editors")]
public class RadColorBox : RadEditorControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadColorBox()
Properties
AutoSize
Gets or sets whether the edit control is auto-sized.
Declaration
public override bool AutoSize { get; set; }
Property Value
System.Boolean
|
Overrides
ColorBoxElement
Gets the RadColorBoxElement of this control.
Declaration
public RadColorBoxElement ColorBoxElement { get; }
Property Value
RadColorBoxElement
|
ColorDialog
Gets the RadColorDialog of this control.
Declaration
public RadColorDialog ColorDialog { get; }
Property Value
RadColorDialog
|
DefaultSize
Gets the default size for the RadColorBox control.
Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size
A System.Drawing.Size structure representing the default dimensions of the control. |
ReadOnly
Gets or sets a value indicating whether users can input text directly into the text field.
Declaration
public bool ReadOnly { get; set; }
Property Value
System.Boolean
|
Text
This property is not relevant for this class.
Declaration
public override string Text { get; set; }
Property Value
System.String
|
Overrides
Value
Gets or sets the color value of the editor.
Declaration
public Color Value { get; set; }
Property Value
System.Drawing.Color
|
Methods
CreateChildItems(RadElement)
Creates the child elements for the RadColorBox control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement
parent
The parent element to which child elements will be added. |
Overrides
CreateColorBoxElement()
Creates the RadColorBoxElement that will be used by this control.
Declaration
protected virtual RadColorBoxElement CreateColorBoxElement()
Returns
RadColorBoxElement
A new instance of RadColorBoxElement. |
Dispose(Boolean)
Releases the unmanaged resources used by the RadColorBox and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources. |
Overrides
IsInputKey(Keys)
Determines whether the specified key is an input key that should be processed by the control.
Declaration
protected override bool IsInputKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
One of the System.Windows.Forms.Keys values that specifies the key to test. |
Returns
System.Boolean
true if the specified key is an input key; otherwise, false. |
Overrides
ProcessAutoSizeChanged(Boolean)
Processes changes to the AutoSize property and adjusts the element stretching behavior accordingly.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
System.Boolean
value
true if AutoSize is enabled; otherwise, false. |
Overrides
ProcessDialogKey(Keys)
Processes a dialog key such as Enter or Escape.
Declaration
protected override bool ProcessDialogKey(Keys keyData)
Parameters
System.Windows.Forms.Keys
keyData
One of the System.Windows.Forms.Keys values that represents the key to process. |
Returns
System.Boolean
true if the key was processed by the control; otherwise, false. |
ResetBackColorThemeOverrides()
Resets the BackColor theme overrides for the ColorBoxElement and applies the default theme values.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets the ForeColor theme overrides for the ColorBoxElement and applies the default theme values.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Sets the BackColor theme overrides for all relevant visual states of the ColorBoxElement.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets the ForeColor theme overrides for all relevant visual states of the ColorBoxElement.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
UnwireEvents()
Unwires the events between the RadColorBox control and its underlying RadColorBoxElement.
Declaration
protected virtual void UnwireEvents()
WireEvents()
Wires the events between the RadColorBox control and its underlying RadColorBoxElement.
Declaration
protected virtual void WireEvents()
Events
DialogClosed
Occurs after the color dialog is closed.
Declaration
public event DialogClosedEventHandler DialogClosed
Event Type
DialogClosedEventHandler
|
ValueChanged
Occurs after the editor value is changed.
Declaration
public event EventHandler ValueChanged
Event Type
System.EventHandler
|
ValueChanging
Occurs right before the value is changed. This is a cancelable event.
Declaration
public event ValueChangingEventHandler ValueChanging
Event Type
ValueChangingEventHandler
|