Click here to Skip to main content
Click here to Skip to main content

Adding fonts to Infragistics WebHtmlEditor

, 23 Mar 2011
Rate this:
Please Sign up or sign in to vote.
Adding fonts to Infragistics WebHtmlEditor
We can add the fonts to the fonts dropdown in addition to the existing basic fonts. To add 'Times New Roman' to the font names drop down-
ToolbarDropDown ddlFonts = (ToolbarDropDown)infraEditor.FindByKeyOrAction("FontName");
ddlFonts.Items.Add(new ToolbarDropDownItem("Times New Roman","Times New Roman"));
Similarly to add all the windows registered fonts-
ToolbarDropDown ddlFonts = (ToolbarDropDown)infraEditor.FindByKeyOrAction("FontName");
InstalledFontCollection fonts = new InstalledFontCollection();
foreach (FontFamily family in fonts.Families)
{
    ddlFonts.Items.Add(new ToolbarDropDownItem(family.Name,family.Name));
}

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Narsimlu Keshagouni
Technical Lead Weston Solutions
India India
Hi, I am Narsimlu Keshagouni working as Technical Lead in Hyderabad, India. I work on the technologies:
 
-ASP.NET
-Silverlight
-WCF
-SQL Server
-SSRS

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 23 Mar 2011
Article Copyright 2011 by Narsimlu Keshagouni
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid