TextSource Class
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace: http://schemas.microsoft.com/winfx/2006/xaml/presentation
All access to the text in the TextSource object is through the GetTextRun, which is designed to allow the text layout client to virtualize text in any way it chooses.
TextFormatter is the WPF text engine that provides services for formatting text and breaking text lines. TextFormatter can handle different text character formats and paragraph styles, and includes support for international text layout. Unlike a traditional text API, the TextFormatter interacts with a text layout client through a set of callback methods. It requires the client to provide these methods in an implementation of the TextSource class. The following list describes the three members you must override:
-
GetTextRun: Retrieves a TextRun starting at a specified TextSource position.
-
GetPrecedingText: Retrieves the text span immediately before the specified TextSource position.
-
GetTextEffectCharacterIndexFromTextSourceCharacterIndex: Retrieves a value that maps a TextSource character index to a TextEffect character index.
Note: |
|---|
| For a complete code sample that shows how to implement a derived TextSource class, see Advanced Text Formatting Sample. |
Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Note: