Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

RtfRun

Namespace OfficeIMO.Rtf
Assembly OfficeIMO.Rtf
Implements
IRtfCloneable IRtfInline
Modifiers sealed

Text run with character-level formatting.

Inheritance

  • Object
  • RtfRun

Usage

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

Accepted by parameters

Methods

public RtfRun ClearRevision() #
Returns: RtfRun

Clears tracked revision metadata from the run.

public RtfRun SetBaseline() #
Returns: RtfRun

Resets the run to normal baseline text.

public RtfRun SetBold(Boolean value = true) #
Returns: RtfRun

Enables bold formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetCapsStyle(RtfCapsStyle capsStyle) #
Returns: RtfRun

Sets the run capitalization effect.

Parameters

capsStyle OfficeIMO.Rtf.RtfCapsStyle requiredposition: 0
public RtfRun SetCharacterBackgroundColor(Nullable<Int32> colorIndex) #
Returns: RtfRun

Sets character background shading to a one-based color table index.

Parameters

colorIndex System.Nullable{System.Int32} requiredposition: 0
public RtfRun SetCharacterBorder(RtfParagraphBorderStyle style, Nullable<Int32> width = null, Nullable<Int32> colorIndex = null) #
Returns: RtfRun

Sets the character border formatting.

Parameters

style OfficeIMO.Rtf.RtfParagraphBorderStyle requiredposition: 0
width System.Nullable{System.Int32} = null optionalposition: 1
colorIndex System.Nullable{System.Int32} = null optionalposition: 2
public RtfRun SetCharacterOffsetHalfPoints(Int32 halfPoints) #
Returns: RtfRun

Sets signed baseline offset in half-points.

Parameters

halfPoints System.Int32 requiredposition: 0
public RtfRun SetCharacterScale(Int32 percent) #
Returns: RtfRun

Sets character scale percentage.

Parameters

percent System.Int32 requiredposition: 0
public RtfRun SetCharacterShading(Nullable<Int32> backgroundColorIndex, Nullable<Int32> foregroundColorIndex = null, Nullable<Int32> patternPercent = null, RtfShadingPattern pattern = None) #
Returns: RtfRun

Sets character shading color and pattern metadata.

Parameters

backgroundColorIndex System.Nullable{System.Int32} requiredposition: 0
foregroundColorIndex System.Nullable{System.Int32} = null optionalposition: 1
patternPercent System.Nullable{System.Int32} = null optionalposition: 2
pattern OfficeIMO.Rtf.RtfShadingPattern = None optionalposition: 3
public RtfRun SetCharacterSpacingTwips(Int32 spacingTwips) #
Returns: RtfRun

Sets character spacing in twips.

Parameters

spacingTwips System.Int32 requiredposition: 0
public RtfRun SetDeletedRevision(Nullable<Int32> authorIndex = null, Nullable<Int32> timestampValue = null) #
Returns: RtfRun

Marks the run as tracked deleted text.

Parameters

authorIndex System.Nullable{System.Int32} = null optionalposition: 0
timestampValue System.Nullable{System.Int32} = null optionalposition: 1
public RtfRun SetDirection(Nullable<RtfTextDirection> direction) #
Returns: RtfRun

Sets explicit run text direction.

Parameters

direction System.Nullable{OfficeIMO.Rtf.RtfTextDirection} requiredposition: 0
public RtfRun SetDoubleStrike(Boolean value = true) #
Returns: RtfRun

Enables double strike-through formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetEmboss(Boolean value = true) #
Returns: RtfRun

Enables embossed text formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetFontSize(Double points) #
Returns: RtfRun

Sets the run font size in points.

Parameters

points System.Double requiredposition: 0
public RtfRun SetForegroundColor(Int32 colorIndex) #
Returns: RtfRun

Sets the foreground color table index.

Parameters

colorIndex System.Int32 requiredposition: 0
public RtfRun SetHidden(Boolean value = true) #
Returns: RtfRun

Enables hidden text formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetHighlightColor(Int32 colorIndex) #
Returns: RtfRun

Sets the highlight color table index.

Parameters

colorIndex System.Int32 requiredposition: 0
public RtfRun SetImprint(Boolean value = true) #
Returns: RtfRun

Enables engraved/imprinted text formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetInsertedRevision(Nullable<Int32> authorIndex = null, Nullable<Int32> timestampValue = null) #
Returns: RtfRun

Marks the run as tracked inserted text.

Parameters

authorIndex System.Nullable{System.Int32} = null optionalposition: 0
timestampValue System.Nullable{System.Int32} = null optionalposition: 1
public RtfRun SetItalic(Boolean value = true) #
Returns: RtfRun

Enables italic formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetKerningHalfPoints(Int32 halfPoints) #
Returns: RtfRun

Sets the kerning threshold in half-points.

Parameters

halfPoints System.Int32 requiredposition: 0
public RtfRun SetLanguage(Int32 languageId) #
Returns: RtfRun

Sets the run language LCID.

Parameters

languageId System.Int32 requiredposition: 0
public RtfRun SetNote(RtfNote note) #
Returns: RtfRun

Attaches a footnote or annotation to this run.

Parameters

note OfficeIMO.Rtf.RtfNote requiredposition: 0
public RtfRun SetOutline(Boolean value = true) #
Returns: RtfRun

Enables outline text formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetRevisionSaveIds(Nullable<Int32> character = null, Nullable<Int32> insertion = null, Nullable<Int32> deletion = null) #
Returns: RtfRun

Sets run-level revision save identifiers.

Parameters

character System.Nullable{System.Int32} = null optionalposition: 0
insertion System.Nullable{System.Int32} = null optionalposition: 1
deletion System.Nullable{System.Int32} = null optionalposition: 2
public RtfRun SetShadow(Boolean value = true) #
Returns: RtfRun

Enables shadow text formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetStrike(Boolean value = true) #
Returns: RtfRun

Enables strike-through formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetStyle(Int32 styleId) #
Returns: RtfRun

Sets the character style id.

Parameters

styleId System.Int32 requiredposition: 0
public RtfRun SetSubscript() #
Returns: RtfRun

Marks the run as subscript text.

public RtfRun SetSuperscript() #
Returns: RtfRun

Marks the run as superscript text.

SetUnderline 2 overloads
public RtfRun SetUnderline(Boolean value = true) #
Returns: RtfRun

Enables underline formatting.

Parameters

value System.Boolean = true optionalposition: 0
public RtfRun SetUnderline(RtfUnderlineStyle style) #
Returns: RtfRun

Sets underline formatting to the requested RTF underline style.

Parameters

style OfficeIMO.Rtf.RtfUnderlineStyle requiredposition: 0
public RtfRun SetUnderlineColor(Int32 colorIndex) #
Returns: RtfRun

Sets the underline color table index.

Parameters

colorIndex System.Int32 requiredposition: 0
public RtfRun TransformTextCase(OfficeTextCase textCase, CultureInfo culture = null) #
Returns: RtfRun

Changes the stored run text casing while preserving character formatting.

Parameters

textCase OfficeIMO.Drawing.OfficeTextCase requiredposition: 0
culture System.Globalization.CultureInfo = null optionalposition: 1

Properties

public String Text { get; set; } #

Run text.

public Boolean UseDefaultCharacterFormatting { get; set; } #

Whether a native plain reset selects document defaults beneath this run's direct and character-style formatting.

public Boolean Bold { get; set; } #

Whether the run is bold.

public Nullable<Boolean> DirectBold { get; set; } #

Authored Bold override. Null inherits from the selected style; an explicit default clears that style value.

public Boolean Italic { get; set; } #

Whether the run is italic.

public Nullable<Boolean> DirectItalic { get; set; } #

Authored Italic override. Null inherits from the selected style; an explicit default clears that style value.

public Boolean Underline { get; set; } #

Whether the run is underlined. Setting this property uses single underline when enabled.

public RtfUnderlineStyle UnderlineStyle { get; set; } #

Underline style for the run.

public Nullable<RtfUnderlineStyle> DirectUnderlineStyle { get; set; } #

Authored UnderlineStyle override. Null inherits from the selected style; an explicit default clears that style value.

public Boolean Strike { get; set; } #

Whether the run is struck through.

public Boolean DoubleStrike { get; set; } #

Whether the run uses double strikethrough.

public Boolean Hidden { get; set; } #

Whether the run is hidden text.

public Nullable<Boolean> DirectHidden { get; set; } #

Authored hidden-text override. Null inherits; false makes text visible beneath a hidden-text style.

public Boolean Outline { get; set; } #

Whether the run text is outlined.

public Boolean Shadow { get; set; } #

Whether the run text has a shadow effect.

public Boolean Emboss { get; set; } #

Whether the run text is embossed.

public Boolean Imprint { get; set; } #

Whether the run text is engraved/imprinted.

public RtfCapsStyle CapsStyle { get; set; } #

Optional all-caps or small-caps character effect.

public RtfVerticalPosition VerticalPosition { get; set; } #

Optional superscript or subscript positioning.

public Nullable<Double> FontSize { get; set; } #

Optional font size in points.

public Nullable<Int32> FontId { get; set; } #

Optional font id.

public Nullable<Int32> ForegroundColorIndex { get; set; } #

Optional foreground color index.

public Nullable<Int32> HighlightColorIndex { get; set; } #

Optional background highlight color index.

public Nullable<Int32> CharacterBackgroundColorIndex { get; set; } #

One-based color table index used by character background shading.

public Nullable<Int32> CharacterShadingForegroundColorIndex { get; set; } #

One-based color table index used by character pattern foreground shading.

public Nullable<Int32> CharacterShadingPatternPercent { get; set; } #

Raw RTF \chshdng value, where 10000 represents 100 percent.

public RtfShadingPattern CharacterShadingPattern { get; set; } #

Named RTF character shading pattern.

public RtfCharacterBorder CharacterBorder { get; set; } #

Character border metadata represented by \chbrdr and following border controls.

public Nullable<Int32> UnderlineColorIndex { get; set; } #

Optional underline color table index. A null value uses the document default.

public Nullable<Int32> CharacterSpacingTwips { get; set; } #

Optional character spacing in twips. Positive values expand text and negative values condense it.

public Nullable<Int32> CharacterScalePercent { get; set; } #

Optional character scale percentage. A null value uses the document default of 100 percent.

public Nullable<Int32> KerningHalfPoints { get; set; } #

Optional kerning threshold in half-points.

public Nullable<Int32> CharacterOffsetHalfPoints { get; set; } #

Optional signed baseline offset in half-points. Positive values raise text and negative values lower it.

public Nullable<Int32> StyleId { get; set; } #

Optional character stylesheet id.

public Nullable<RtfTextDirection> Direction { get; set; } #

Explicit run text direction represented by \ltrch or \rtlch.

public Nullable<Int32> LanguageId { get; set; } #

Optional run language LCID represented by \lang.

public RtfNote Note { get; set; } #

Optional footnote or annotation emitted immediately after this run.

public RtfRevisionKind RevisionKind { get; set; } #

Optional tracked revision marker for this run.

public Nullable<Int32> RevisionAuthorIndex { get; set; } #

Optional zero-based index into the document revision author table.

public Nullable<Int32> RevisionTimestampValue { get; set; } #

Optional raw RTF DTTM revision timestamp value from \revdttm.

public Nullable<Int32> CharacterRevisionSaveId { get; set; } #

Character revision save identifier represented by \charrsid.

public Nullable<Int32> InsertionRevisionSaveId { get; set; } #

Insertion revision save identifier represented by \insrsid.

public Nullable<Int32> DeletionRevisionSaveId { get; set; } #

Deletion revision save identifier represented by \delrsid.