New to Telerik UI for WinForms? Start a free 30-day trial

Represents a dialog that can be used to select color with rich UI and extended functionality.

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
[TelerikToolboxCategory("Dialogs")]
public class RadColorDialog : CommonDialog, IComponent, IDisposable

Inheritance: objectMarshalByRefObjectComponentCommonDialogRadColorDialog

Implements: IComponentIDisposable

Constructors

Initializes a new instance of the RadColorDialog class.

C#
public RadColorDialog()

Properties

Gets the instance of IRadColorDialog, which incorporates various settings of the underlying color selection Form and ColorSelector user control.

C#
[Browsable(false)]
public IRadColorDialog ColorDialogForm { get; }

Gets the user-defined colors. References to CustomColors of ColorDialogForm.

C#
[Browsable(false)]
public Color[] CustomColors { get; }

Gets or sets the icon displayed for this dialog.

C#
public Icon Icon { get; set; }

Gets or sets the selected color that was previously selected. References to OldColor of ColorDialogForm.

C#
public Color OldColor { get; set; }

Gets or sets a value indicating whether control's elements are aligned to support locales using right-to-left fonts.

C#
public virtual RightToLeft RightToLeft { get; set; }
Property Value:

One of the RightToLeft values. The default is Inherit.

Exceptions: InvalidEnumArgumentException

The assigned value is not one of the RightToLeft values.

Gets or sets the selected color. References to SelectedColor of ColorDialogForm.

C#
public Color SelectedColor { get; set; }

Gets or sets the selected HSL color. References to SelectedHslColor of ColorDialogForm.

C#
public HslColor SelectedHslColor { get; set; }

Methods

Releases the unmanaged resources used by the RadColorDialog and optionally releases the managed resources.

C#
protected override void Dispose(bool disposing)
Parameters:disposingbool

true to release both managed and unmanaged resources; false to release only unmanaged resources.

Overrides: Component.Dispose(bool)

Resets the properties of a color dialog box to their default values. Replaces the underlying ColorDialogForm with new instance.

C#
public override void Reset()

Overrides: CommonDialog.Reset()

Shows the modal dialog box with the specified owner.

C#
protected override bool RunDialog(IntPtr hwndOwner)
Parameters:hwndOwnerIntPtr

A value that represents the window handle of the owner window for the common dialog box.

Returns:

bool

true if the dialog box was successfully run and the user clicked OK; otherwise, false.

Overrides: CommonDialog.RunDialog(IntPtr)