# OdfTextRun

A native styled inline span.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`15caddadea70` with working tree changes

**Source**

[OdfTextContent.cs:103](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L103)

**Base**

`OdfTextContent`

**Modifiers**

sealed

A native styled inline span.

## Inheritance

- [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)
- OdfTextRun

## Usage

Explore 11 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 11

- Method [OdfTextContent.AddRun](/api/open-document/officeimo-opendocument-odftextcontent/#method-addrun-string)
- Property [OdfTextContent.Runs](/api/open-document/officeimo-opendocument-odftextcontent/#property-runs)
- Method [OdfTextHyperlink.AddRun](/api/open-document/officeimo-opendocument-odftexthyperlink/#method-addrun-string)
- Property [OdfTextHyperlink.Runs](/api/open-document/officeimo-opendocument-odftexthyperlink/#property-runs)
- Property [OdfTextNode.Run](/api/open-document/officeimo-opendocument-odftextnode/#property-run)
- Method [OdfTextParagraph.AddRun](/api/open-document/officeimo-opendocument-odftextparagraph/#method-addrun-string)
- Property [OdfTextParagraph.Runs](/api/open-document/officeimo-opendocument-odftextparagraph/#property-runs)
- Method [OdfTextRun.AddRun](/api/open-document/officeimo-opendocument-odftextrun/#method-addrun-string)
- Method [OdfTextRun.AddText](/api/open-document/officeimo-opendocument-odftextrun/#method-addtext-string)
- Method [OdfTextRun.TransformTextCase](/api/open-document/officeimo-opendocument-odftextrun/#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)
- Property [OdfTextRun.Runs](/api/open-document/officeimo-opendocument-odftextrun/#property-runs)

Filter members 

Show inherited

## Methods

`public OdfTextRun AddText(string text)` [#](#method-addtext-string)

[OdfTextContent.cs:103](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L103)

Appends native text and returns this inline.

Parameters

**text string required**

Returns

`OdfTextRun`

`public OdfTextRun TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null)` [#](#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)

[OdfTextContent.cs:105](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L105)

Transforms stored text and returns the same native receiver.

Parameters

**textCase OfficeIMO.Drawing.OfficeTextCase required**

**culture System.Globalization.CultureInfo? = null optional**

Returns

`OdfTextRun`

## Inherited Methods

`public OdfTextField AddField(OdfTextFieldKind kind, string? displayText = null)` [#](#method-addfield-odftextfieldkind-string)

[OdfTextContent.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L84)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

Parameters

**kind OdfTextFieldKind required**

**displayText string? = null optional**

Returns

`OdfTextField`

`public OdfTextHyperlink AddHyperlink(string text, string href)` [#](#method-addhyperlink-string-string)

[OdfTextContent.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L77)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

Parameters

**text string required**

**href string required**

Returns

`OdfTextHyperlink`

`public OdfTextRun AddRun(string? text = null)` [#](#method-addrun-string)

[OdfTextContent.cs:72](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L72)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

Parameters

**text string? = null optional**

Returns

`OdfTextRun`

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

`public XElement ToXml()` [#](#method-toxml)

[OdfTextContent.cs:91](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L91)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

Returns

`XElement`

## Inherited Properties

`public string Text { get; set; }` [#](#property-text)

[OdfTextContent.cs:15](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L15)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public string? StyleName { get; set; }` [#](#property-stylename)

[OdfTextContent.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L17)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public IReadOnlyList<OdfTextNode> InlineNodes { get; }` [#](#property-inlinenodes)

[OdfTextContent.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L19)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public IReadOnlyList<OdfTextRun> Runs { get; }` [#](#property-runs)

[OdfTextContent.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L21)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public IReadOnlyList<OdfTextHyperlink> Hyperlinks { get; }` [#](#property-hyperlinks)

[OdfTextContent.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L24)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public IReadOnlyList<OdfTextField> Fields { get; }` [#](#property-fields)

[OdfTextContent.cs:27](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L27)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public bool? Bold { get; set; }` [#](#property-bold)

[OdfTextContent.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L31)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public bool? Italic { get; set; }` [#](#property-italic)

[OdfTextContent.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L33)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public bool? Underline { get; set; }` [#](#property-underline)

[OdfTextContent.cs:35](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L35)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfTextDecorationStyle? UnderlineStyle { get; set; }` [#](#property-underlinestyle)

[OdfTextContent.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L37)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfTextDecorationType? UnderlineType { get; set; }` [#](#property-underlinetype)

[OdfTextContent.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L39)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public bool? Strikethrough { get; set; }` [#](#property-strikethrough)

[OdfTextContent.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L41)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfLength? FontSize { get; set; }` [#](#property-fontsize)

[OdfTextContent.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L43)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public string? FontFamily { get; set; }` [#](#property-fontfamily)

[OdfTextContent.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L45)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfColor? Color { get; set; }` [#](#property-color)

[OdfTextContent.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L47)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public double? TextOpacity { get; set; }` [#](#property-textopacity)

[OdfTextContent.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L53)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfColor? BackgroundColor { get; set; }` [#](#property-backgroundcolor)

[OdfTextContent.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L58)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfTextPosition? TextPosition { get; set; }` [#](#property-textposition)

[OdfTextContent.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L62)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public OdfTextTransform? TextTransform { get; set; }` [#](#property-texttransform)

[OdfTextContent.cs:64](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L64)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

`public bool? SmallCaps { get; set; }` [#](#property-smallcaps)

[OdfTextContent.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/15caddadea7080f6e4b3027fdb95451a0210bdb1/OfficeIMO.OpenDocument/Text/OdfTextContent.cs#L66)

Inherited from [OdfTextContent](/api/open-document/officeimo-opendocument-odftextcontent/)

<!-- PowerForge markdown artifact sha256:5C185D0B835392EC5A347C8A0EF5D2CE42D972E7A3348268F3A749C64E898D37 -->
