$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Panels and Labels WinForms Control
Create better user interface design and appearance using Panels and Labels WinForms Controls
Home > WinForms UI Controls > User Manual > Format Text to Labels in C#

Format Label Text like HTML in C#.NET Applications

The Kettic Label Control for Windows Forms allows the users to format label text like HTML. This HTML-like text formatting functionality is an advanced text styling that is supported by all Kettic User Interface Controls. This text formatting functionality uses only a few simple HTML tags to format text style and display the text on label. It is capable of formatting the text font style, font color, font size options and simple layouts by using the HTML like tags supported by Kettic Label Control.

How to Format Text Displaying on Label

  • Start the text formatting by using the tag, < html >,
  • Customize the font size by using the tag, < size=value >,
  • If we shall break down a single line text, use the < br >,
  • To bold, underline and italic text, use the corresponding tags as below list
  • To set text font, use the Font family tags, < font=family >

Text Formatting Tags Support

  • < html >, Start tag for formatting the text
  • < font=family >, Use a single tag to define the font family of the text
  • < color=name >, Use a single tag to specifies the color of the text
  • < size=value >, Use a single tag to set the font size of the text
  • < b > < /b >, Use couple tags used to specifies the text to bold.
  • < I > < /I >, Use couple tags specifies the text to italic.
  • < u > < /u >, Use couple tags to defines underlined text.
  • < br > Use a single tag to break down a single line text

Sample of Text Formatting like HTML

The following is an example of C# code snippet using the above text formatting tags to format the text style.
C# code for formatting the KetticLabel text using HTML tags

this.ketticLabel1.Text = "<html>
<size=12>This is KetticLabel
<br>
<b><font=Arial>Arial, Bold</b>
<br>
<i><color= Green><font=Calibri>Calibri, Italic <u>Underline</u>
<br>
<size=12>Size = 12
<br>
<color= 0, 0, 255>Sample Text"
;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls