Share via


Text 

Graphical user interfaces make extensive use of text capabilities as a primary means of conveying information to the user and providing user input. Text controls allow you to add dynamic and static text features to your application. Text controls, such as rich edit controls and the WPF FlowDocument control, provide a rich assortment of functionality, such as scrollbar support, multiple font styles, and page breaking. Lighter-weight text controls, such as labels, are optimized for small amounts of static text.

Text also involves displaying content directly to the screen surface through the use of special purpose functions, such as the Win32 DrawText function.

Text Edit Controls

Text edit controls receive input focus when a user clicks the mouse inside it or presses the TAB key. After it is selected, the edit control displays its text and a flashing caret that indicates the insertion point. The user can then enter text, move the insertion point, or select text to be edited by using the keyboard or the mouse. An edit controls sent event notification messages that your application can receive.

Programming Model Documentation Links

Managed

System.Windows.Documents.FlowDocument (WPF)

System.Windows.Controls.TextBox (WPF)

System.Windows.Forms.TextBox (Forms)

System.Web.UI.WebControls.TextBox (Web)

Unmanaged

Rich Edit Controls (Win32)

Edit Controls (Win32)

Text Status Controls

Text status controls are controls that display static text, such as labels. These types of text controls are optimized for displaying small amounts of text and should be used in cases where there is no user input required.

Programming Model Documentation Links

Managed

System.Windows.Controls.TextBlock (WPF)

System.Windows.Controls.Label (WPF)

System.Windows.Forms.Label (Forms)

System.Web.UI.WebControls.Label (Web)

Unmanaged

About Static Controls (Win32)

Creating and Displaying Text

Low-level formatting of text allows you to provide customized output of text, in which each character can be individually formatted. This use of text functionality is often used when performance needs are the essential, such as in the design of light-weight custom control.

Programming Model Documentation Links

Managed

Drawing Formatted Text (WPF)

Unmanaged

About Text Output (GDI)

DrawText (GDI)

Fonts and Typography

Font and typography technologies provide developers with a broad assortment of features for composing text to output devices. For example, the Typography object in WPF exposes many of the advanced features of OpenType® font technology, such as stylistic alternates and swashes.

Programming Model Documentation Links

Managed

Typography in Windows Presentation Foundation

OpenType Font Features (WPF)

Using Fonts and Text (Forms)

Unmanaged

Fonts and Text (GDI)

See Also

Concepts

Presentation Layout
User Interface Design Planning