RichTextBox for UWP | ComponentOne
In This Topic
    Working with C1Document Object
    In This Topic

    The C1Document object exposes a rich object model for creating and editing the underlying document. So far, we have focused on the object model of the C1RichTextBox control, which is the editable view of a C1Document object. The architecture of the C1Document object is similar to the one used by the Microsoft WPF RichTextBox control, which provides a view of a FlowDocument object.

    The C1Document exposes the structure of the document, where the C1RichTextBox deals mainly with text as a flat, linear view of the control. The document model in C1Document makes it easy to enumerate runs within each paragraph, items within each list, and so on. This will be shown in a later section.

    Programming directly against the C1Document object is the best way to perform many tasks, including report generation and the implementation of import and export filters. For example, the Html property exposes an HTML filter with methods that convert C1Document objects to and from HTML strings. You could implement a similar filter class to import and export other popular formats such as RTF or PDF.

    See Also