RadEditor for ASP.NET

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


Gets the collection containing the custom font names to put in the Font dropdown.   

 

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

Syntax

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

Return Value

A string collection containing the custom font names to put in the Font dropdown. Default is an empty StringCollection.

Example

This example demonstrates how to add Arial Narrow font to the Font dropdown.
Visual BasicCopy Code
Private Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
    RadEditor1.FontNames.Add("Arial")
    RadEditor1.FontNames.Add("Arial Narrow")
    RadEditor1.FontNames.Add("Comic Sans MS")
    RadEditor1.FontNames.Add("Courier New")
    RadEditor1.FontNames.Add("Tahoma")
    RadEditor1.FontNames.Add("Times New Roman")
    RadEditor1.FontNames.Add("Verdana")
End Sub
C#Copy Code
private void Page_Load(object sender, EventArgs e)
{
   RadEditor1.FontNames.Add(
"Arial");
   RadEditor1.FontNames.Add(
"Arial Narrow");
   RadEditor1.FontNames.Add(
"Comic Sans MS");
   RadEditor1.FontNames.Add(
"Courier New");
   RadEditor1.FontNames.Add(
"Tahoma");
   RadEditor1.FontNames.Add(
"Times New Roman");
   RadEditor1.FontNames.Add(
"Verdana");
}
    

Remarks

The contents of this collection will override the default fonts available in the Font dropdown. In order to extend the default set you should add the default font names and the new font names. The default font names are: Arial, Comic Sans MS, Courier New, Tahoma, Times New Roman, Verdana.

Note: the fonts must exist on the client computer.

Requirements

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

See Also