[]
Represents the text frame in the IShape.
public interface ITextRange : IEnumerable
Returns the number of objects in the collection (read-only).
int Count { get; }
Returns the IFontFormat object that represents character formatting for the IFontFormat object (read-only).
IFontFormat Font { get; }
Returns the index in the collection (read-only).
int Index { get; }
Gets the ITextRange with the specified index.
ITextRange this[int index] { get; }
index
intThe index.ITextRange
Get the paragraphs of ITextRange
ITextRange Paragraphs { get; }
This property is only used in TextRangeType.Body; otherwise, it throws InvalidOperateExecption.
Get the runs of ITextRange
ITextRange Runs { get; }
This property is only used in TextRangeType.Paragraph; otherwise, it throws InvalidOperateExecption.
Gets or sets a String value that represents the text in a text range (read/write).
string Text { get; set; }
Gets or sets the horizontal alignment of the text.
TextAlignmentAnchor TextAlignment { get; set; }
Returns the type of ITextRange, such as TextRangeType.Body, TextRangeType.Paragrapsh, or TextRangeType.Run.
TextRangeType Type { get; }
Adds text to the specified collection.
ITextRange Add(string newText = "", int position = -1)
newText
stringThe new text.
position
intThe position that you want to insert.
The new ITextRange.
This property is only used in TextRangeType.Body and TextRangeType.Paragraph. Use this property on ITextRange.Body and it will add a paragraph with a run. Use this property on ITextRange.Paragraph and it will add a run.
Deletes from parent.
void Delete()