Search Results for

    Show / Hide Table of Contents

    Class TextContent

    Represents a single run of text within a text content element.

    Inheritance
    System.Object
    ContentElement
    TextContentElement
    TextContent
    Implements
    IronSoftware.Abstractions.IDocumentElement
    ITextContentElement
    IWordTextObject
    IWordDocumentObject
    IronSoftware.IDocumentObject
    IronSoftware.IDocumentTextObject
    IronSoftware.IBoundedDocumentObject
    IronSoftware.IBounded
    IronSoftware.ITransformable
    IronSoftware.IColored
    System.ICloneable
    IronSoftware.IJsonSerializable
    Inherited Members
    TextContentElement.Replace(String, String, Nullable<RegexOptions>, Boolean, Boolean)
    TextContentElement.Find(String, Nullable<RegexOptions>, Boolean, Boolean)
    TextContentElement.ToString()
    TextContentElement.Text
    TextContentElement.Style
    ContentElement.Status
    ContentElement.Replace(ContentElement)
    ContentElement.Remove()
    ContentElement.GetIndex<T>()
    ContentElement.Clone()
    ContentElement.CloneObject()
    ContentElement.Parent
    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
    ITextContentElement
    IWordTextObject
    IWordDocumentObject
    IronSoftware.IDocumentObject
    IronSoftware.IDocumentTextObject
    IronSoftware.IBoundedDocumentObject
    IronSoftware.IBounded
    IronSoftware.ITransformable
    IronSoftware.IColored
    System.ICloneable
    IronSoftware.IJsonSerializable

    Inherited members

    Replace(String, String, Nullable<RegexOptions>, Boolean, Boolean)
    Find(String, Nullable<RegexOptions>, Boolean, Boolean)
    ToString()
    Text
    Style
    Status
    Replace(ContentElement)
    Remove()
    GetIndex<T>()
    Clone()
    CloneObject()
    Parent
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronWord to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronWord free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.