DocumentFragment
Definition
Namespace:Telerik.WinForms.Documents.Model
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class DocumentFragment
Inheritance: objectDocumentFragment
Constructors
Initializes a new instance of the DocumentFragment class.
public DocumentFragment(DocumentSelection documentSelection, bool includeNonCopyableAnnotationMarkers)
selection
includeNonCopyableAnnotationMarkersboolIf true result fragment will contain non-copyable elements like read-only and permission ranges. Otherwise these elements will be removed from the result fragment.
Initializes a new instance of the DocumentFragment class.
public DocumentFragment(DocumentSelection documentSelection)
The document selection to be added to the fragment.
Initializes a new instance of the DocumentFragment class.
public DocumentFragment(RadDocument document)
The document to be added to the fragment.
Properties
Gets a value indicating whether the fragment is empty.
public bool IsEmpty { get; }
true if the fragment is empty; otherwise, false.
Gets or sets a value indicating whether the fragment ends with full empty paragraph.
public bool IsLastParagraphClosed { get; set; }
true if the fragment ends with full empty paragraph; otherwise, false.
Methods
Enumerates all children of a specified type.
public IEnumerable<T> EnumerateChildrenOfType<T>() where T : DocumentElement
IEnumerable<T>
A collection from the children of the specified type.
Converts the fragment to plain text.
public string GetText()
String containing the text representation of the document.
Converts to this instance to a RadDocument.