RichEditBox

RichEditBox is a version of TextBox that enables the display and editing of rich-formatted text. The reason it’s called RichEditBox rather than the more obvious RichTextBox is that it’s a thin wrapper over rich text formatting exposed by the Windows Runtime, which is a whole different set of APIs than the XAML-specific rich text formatting APIs. The “rich edit” term also has a long history in Win32.

The implication of this is that interacting with RichEditBox feels a lot less like interacting with a typical XAML control and instead has an API style that betrays its Windows Runtime roots. RichEditBox has a Document property of type ITextDocument rather than BlockCollection. The property is read-only, and there’s no public class that ...

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.