TextElement Class
Represents a base class for text elements such as runs, fields, line breaks and unknown text elements.
- Inheritance:
- System.ObjectTextElement
- Derived
Properties
ElementType
Gets the type of the text element.
public abstract TextElementType ElementType { get; }
Public MustOverride ReadOnly Property ElementType As TextElementType
Property Value
The type of the text element.
Format
Gets or sets the character formatting options.
public TextCharacterFormat Format { get; set; }
Public Property Format As TextCharacterFormat
Property Value
The character formatting options.
Remarks
This property always returns a new instance of a TextCharacterFormat that points to data associated with this text element. This reduces memory footprint since simpler internal structures can be used to hold the data and execution time increase is negligible since Garbage Collector has a very good performance for a short-lived (Generation 0) objects.
When setting a value, instance of a TextCharacterFormat won't actually be stored in this text element, but the data to which the instance points to will be copied. This enables easy copying of complex properties from one text element to another.
Parent
Gets the parent text paragraph or null if text element was deleted.
Property Value
The parent text paragraph or null if text element was deleted.
Slide
Gets the slide associated with this text element.
Property Value
The slide associated with this text element.
TextContent
Gets the text content of the current TextElement.
Property Value
The text content of the current TextElement.
Remarks
The property always returns a new instance of the TextRange class.
For more information, see Find and Replace example.
Methods
ToString()
Returns a System.String that represents this TextElement instance.
public abstract override string ToString()
Public MustOverride Overrides Function ToString As String
Returns
- System.String
A System.String that represents this TextElement instance.