RadEditor for ASP.NET

RadEditor Send comments on this topic.
Colors Property
See Also  Example
Telerik.WebControls Namespace > RadEditor Class : Colors Property


Gets the collection containing the colors to put in the Foreground and Background color dropdowns.   

 

Namespace: Telerik.WebControls
Assembly: RadEditor (in RadEditor.dll)

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Colors As StringCollection
Visual Basic (Usage)Copy Code
Dim instance As RadEditor
Dim value As StringCollection
 
value = instance.Colors
C# 
public StringCollection Colors {get;}

Return Value

A StringCollection containing the colors to put in the Foreground and Background color dropdowns. Default is an empty StringCollection.

Example

This example demonstrates how to put only Red, Green and Blue into the Foreground and Background dropdowns.
Visual BasicCopy Code
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    RadEditor1.Colors.Add("Red")
    RadEditor1.Colors.Add("Green")
    RadEditor1.Colors.Add("Blue")
End Sub
C#Copy Code
private void Page_Load(object sender, EventArgs e)
{
   RadEditor1.Colors.Add(
"Red");
   RadEditor1.Colors.Add(
"Green");
   RadEditor1.Colors.Add(
"Blue");
}
    

Remarks

The contents of this collection will override the default colors available in the Foreground and Background color dropdowns. In order to extend the default set you should add the default colors and the new colors.

Note: Setting this property will affect all color pickers of the RadEditor, including those in the table proprties dialogs.

Requirements

Platforms: Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also