Class TextContent
Represents a single run of text within a text content element.
Implements
IronSoftware.Abstractions.IDocumentElement
IronSoftware.IDocumentObject
IronSoftware.IDocumentTextObject
IronSoftware.IBoundedDocumentObject
IronSoftware.IBounded
IronSoftware.ITransformable
IronSoftware.IColored
System.ICloneable
IronSoftware.IJsonSerializable
Inherited Members
Namespace: IronWord.Models
Assembly: IronWord.dll
Syntax
public class TextContent : TextContentElement, IDocumentElement, ITextContentElement, IWordTextObject, IWordDocumentObject, IDocumentObject, IDocumentTextObject, IBoundedDocumentObject, IBounded, ITransformable, IColored, ICloneable, IJsonSerializable
Constructors
TextContent()
Initializes a new instance of the Text class.
Declaration
public TextContent()
TextContent(String)
Initializes a new instance of the Text class with the specified text content.
Declaration
public TextContent(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | The initial text content of the Text object. |
Properties
BoundingBox
Declaration
public RectangleF BoundingBox { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.RectangleF |
Color
Declaration
public Color Color { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Color |
Contents
Declaration
public string Contents { get; set; }
Property Value
| Type | Description |
|---|---|
| System.String |
ContentStart
Declaration
public int ContentStart { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Int32 |
DocumentId
Declaration
public IDocumentId DocumentId { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.IDocumentId |
FillColor
Declaration
public Color FillColor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Color |
Font
Declaration
public IDocumentFontObject Font { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.IDocumentFontObject |
FontSize
Declaration
public float FontSize { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Single |
IsBold
Declaration
public bool IsBold { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
IsItalic
Declaration
public bool IsItalic { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Matrix
Declaration
public MatrixStruct Matrix { get; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.MatrixStruct |
ObjNum
Declaration
public uint ObjNum { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
PageIndex
Declaration
public uint PageIndex { get; set; }
Property Value
| Type | Description |
|---|---|
| System.UInt32 |
RenderMode
Declaration
public TextRenderModes RenderMode { get; set; }
Property Value
| Type | Description |
|---|---|
| IronSoftware.TextRenderModes |
Rotation
Declaration
public double Rotation { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Double |
Scale
Declaration
public PointF Scale { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.PointF |
StrokeColor
Declaration
public Color StrokeColor { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.Color |
Translate
Declaration
public PointF Translate { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Drawing.PointF |
Methods
Append(TextContent)
Appends the text content to this Text content.
Declaration
public TextContent Append(TextContent textContent)
Parameters
| Type | Name | Description |
|---|---|---|
| TextContent | textContent | The text content to append. |
Returns
| Type | Description |
|---|---|
| TextContent |
Split(String)
Splits the current Run into smaller Runs based on a delimiter.
Declaration
public List<TextContent> Split(string delimiter)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | delimiter | The delimiter to use for splitting. |
Returns
| Type | Description |
|---|---|
| System.Collections.Generic.List<TextContent> | List of Run objects after split. |
ToJson()
Declaration
public string ToJson()
Returns
| Type | Description |
|---|---|
| System.String |
Implements
IronSoftware.Abstractions.IDocumentElement
IronSoftware.IDocumentObject
IronSoftware.IDocumentTextObject
IronSoftware.IBoundedDocumentObject
IronSoftware.IBounded
IronSoftware.ITransformable
IronSoftware.IColored
System.ICloneable
IronSoftware.IJsonSerializable