API Reference
RtfRun
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.
Returned or exposed by
- Method RtfDocument.ResolveRunFormatting
- Method RtfField.AddText
- Method RtfParagraph.AddAnnotation
- Method RtfParagraph.AddEndnote
- Method RtfParagraph.AddFootnote
- Method RtfParagraph.AddText
- Property RtfParagraph.Runs
- Method RtfRun.ClearRevision
- Method RtfRun.SetBaseline
- Method RtfRun.SetBold
- Method RtfRun.SetCapsStyle
- Method RtfRun.SetCharacterBackgroundColor
- Method RtfRun.SetCharacterBorder
- Method RtfRun.SetCharacterOffsetHalfPoints
- Method RtfRun.SetCharacterScale
- Method RtfRun.SetCharacterShading
- Method RtfRun.SetCharacterSpacingTwips
- Method RtfRun.SetDeletedRevision
- Method RtfRun.SetDirection
- Method RtfRun.SetDoubleStrike
- Method RtfRun.SetEmboss
- Method RtfRun.SetFontSize
- Method RtfRun.SetForegroundColor
- Method RtfRun.SetHidden
- Method RtfRun.SetHighlightColor
- Method RtfRun.SetHyperlink
- Method RtfRun.SetImprint
- Method RtfRun.SetInsertedRevision
- Method RtfRun.SetItalic
- Method RtfRun.SetKerningHalfPoints
- Method RtfRun.SetLanguage
- Method RtfRun.SetNote
- Method RtfRun.SetOutline
- Method RtfRun.SetRevisionSaveIds
- Method RtfRun.SetShadow
- Method RtfRun.SetStrike
- Method RtfRun.SetStyle
- Method RtfRun.SetSubscript
- Method RtfRun.SetSuperscript
- Method RtfRun.SetUnderline
- Method RtfRun.SetUnderline
- Method RtfRun.SetUnderlineColor
- Method RtfRun.TransformTextCase
Accepted by parameters
Methods
public RtfRun SetBold(Boolean value = true) #RtfRunEnables bold formatting.
Parameters
- value System.Boolean = true
public RtfRun SetCapsStyle(RtfCapsStyle capsStyle) #RtfRunSets the run capitalization effect.
Parameters
- capsStyle OfficeIMO.Rtf.RtfCapsStyle
public RtfRun SetCharacterBackgroundColor(Nullable<Int32> colorIndex) #RtfRunSets character background shading to a one-based color table index.
Parameters
- colorIndex System.Nullable{System.Int32}
public RtfRun SetCharacterBorder(RtfParagraphBorderStyle style, Nullable<Int32> width = null, Nullable<Int32> colorIndex = null) #RtfRunSets the character border formatting.
Parameters
- style OfficeIMO.Rtf.RtfParagraphBorderStyle
- width System.Nullable{System.Int32} = null
- colorIndex System.Nullable{System.Int32} = null
public RtfRun SetCharacterOffsetHalfPoints(Int32 halfPoints) #RtfRunSets signed baseline offset in half-points.
Parameters
- halfPoints System.Int32
public RtfRun SetCharacterScale(Int32 percent) #RtfRunSets character scale percentage.
Parameters
- percent System.Int32
public RtfRun SetCharacterShading(Nullable<Int32> backgroundColorIndex, Nullable<Int32> foregroundColorIndex = null, Nullable<Int32> patternPercent = null, RtfShadingPattern pattern = None) #RtfRunSets character shading color and pattern metadata.
Parameters
- backgroundColorIndex System.Nullable{System.Int32}
- foregroundColorIndex System.Nullable{System.Int32} = null
- patternPercent System.Nullable{System.Int32} = null
- pattern OfficeIMO.Rtf.RtfShadingPattern = None
public RtfRun SetCharacterSpacingTwips(Int32 spacingTwips) #RtfRunSets character spacing in twips.
Parameters
- spacingTwips System.Int32
public RtfRun SetDeletedRevision(Nullable<Int32> authorIndex = null, Nullable<Int32> timestampValue = null) #RtfRunMarks the run as tracked deleted text.
Parameters
- authorIndex System.Nullable{System.Int32} = null
- timestampValue System.Nullable{System.Int32} = null
public RtfRun SetDirection(Nullable<RtfTextDirection> direction) #RtfRunSets explicit run text direction.
Parameters
- direction System.Nullable{OfficeIMO.Rtf.RtfTextDirection}
public RtfRun SetDoubleStrike(Boolean value = true) #RtfRunEnables double strike-through formatting.
Parameters
- value System.Boolean = true
public RtfRun SetEmboss(Boolean value = true) #RtfRunEnables embossed text formatting.
Parameters
- value System.Boolean = true
public RtfRun SetFontSize(Double points) #RtfRunSets the run font size in points.
Parameters
- points System.Double
public RtfRun SetForegroundColor(Int32 colorIndex) #RtfRunSets the foreground color table index.
Parameters
- colorIndex System.Int32
public RtfRun SetHighlightColor(Int32 colorIndex) #RtfRunSets the highlight color table index.
Parameters
- colorIndex System.Int32
public RtfRun SetHyperlink(Uri uri) #RtfRunMarks the run as a hyperlink.
Parameters
- uri System.Uri
public RtfRun SetImprint(Boolean value = true) #RtfRunEnables engraved/imprinted text formatting.
Parameters
- value System.Boolean = true
public RtfRun SetInsertedRevision(Nullable<Int32> authorIndex = null, Nullable<Int32> timestampValue = null) #RtfRunMarks the run as tracked inserted text.
Parameters
- authorIndex System.Nullable{System.Int32} = null
- timestampValue System.Nullable{System.Int32} = null
public RtfRun SetItalic(Boolean value = true) #RtfRunEnables italic formatting.
Parameters
- value System.Boolean = true
public RtfRun SetKerningHalfPoints(Int32 halfPoints) #RtfRunSets the kerning threshold in half-points.
Parameters
- halfPoints System.Int32
public RtfRun SetLanguage(Int32 languageId) #RtfRunSets the run language LCID.
Parameters
- languageId System.Int32
public RtfRun SetNote(RtfNote note) #RtfRunAttaches a footnote or annotation to this run.
Parameters
- note OfficeIMO.Rtf.RtfNote
public RtfRun SetOutline(Boolean value = true) #RtfRunEnables outline text formatting.
Parameters
- value System.Boolean = true
public RtfRun SetRevisionSaveIds(Nullable<Int32> character = null, Nullable<Int32> insertion = null, Nullable<Int32> deletion = null) #RtfRunSets run-level revision save identifiers.
Parameters
- character System.Nullable{System.Int32} = null
- insertion System.Nullable{System.Int32} = null
- deletion System.Nullable{System.Int32} = null
public RtfRun SetShadow(Boolean value = true) #RtfRunEnables shadow text formatting.
Parameters
- value System.Boolean = true
public RtfRun SetStrike(Boolean value = true) #RtfRunEnables strike-through formatting.
Parameters
- value System.Boolean = true
public RtfRun SetStyle(Int32 styleId) #RtfRunSets the character style id.
Parameters
- styleId System.Int32
public RtfRun SetUnderline(Boolean value = true) #RtfRunEnables underline formatting.
Parameters
- value System.Boolean = true
public RtfRun SetUnderline(RtfUnderlineStyle style) #RtfRunSets underline formatting to the requested RTF underline style.
Parameters
- style OfficeIMO.Rtf.RtfUnderlineStyle
public RtfRun SetUnderlineColor(Int32 colorIndex) #RtfRunSets the underline color table index.
Parameters
- colorIndex System.Int32
public RtfRun TransformTextCase(OfficeTextCase textCase, CultureInfo culture = null) #RtfRunChanges the stored run text casing while preserving character formatting.
Parameters
- textCase OfficeIMO.Drawing.OfficeTextCase
- culture System.Globalization.CultureInfo = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
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 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 Uri Hyperlink { get; set; } #Optional hyperlink target. When set, the writer emits the run as an RTF field.
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.