RtfRun
OfficeIMO.Rtf
Text run with character-level formatting.
Inheritance
- object
- RtfRun
Usage
Explore 43 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 42
- 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.SetDoubleStrikethrough
- 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.SetStrikethrough
- Method RtfRun.SetStyle
- Method RtfRun.SetSubscript
- Method RtfRun.SetSuperscript
- Method RtfRun.SetUnderline
- Method RtfRun.SetUnderlineColor
- Method RtfRun.TransformTextCase
Accepted by parameters 1
Methods
public RtfRun SetBold(bool value = true) #Enables bold formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetCapsStyle(RtfCapsStyle capsStyle) #Sets the run capitalization effect.
Parameters
- capsStyle OfficeIMO.Rtf.RtfCapsStyle
Returns
RtfRunpublic RtfRun SetCharacterBackgroundColor(int? colorIndex) #Sets character background shading to a one-based color table index.
Parameters
- colorIndex int?
Returns
RtfRunpublic RtfRun SetCharacterBorder(RtfParagraphBorderStyle style, int? width = null, int? colorIndex = null) #Sets the character border formatting.
Parameters
- style OfficeIMO.Rtf.RtfParagraphBorderStyle
- width int? = null
- colorIndex int? = null
Returns
RtfRunpublic RtfRun SetCharacterOffsetHalfPoints(int halfPoints) #Sets signed baseline offset in half-points.
Parameters
- halfPoints int
Returns
RtfRunpublic RtfRun SetCharacterScale(int percent) #Sets character scale percentage.
Parameters
- percent int
Returns
RtfRunpublic RtfRun SetCharacterShading(int? backgroundColorIndex, int? foregroundColorIndex = null, int? patternPercent = null, RtfShadingPattern pattern = None) #Sets character shading color and pattern metadata.
Parameters
- backgroundColorIndex int?
- foregroundColorIndex int? = null
- patternPercent int? = null
- pattern OfficeIMO.Rtf.RtfShadingPattern = None
Returns
RtfRunpublic RtfRun SetCharacterSpacingTwips(int spacingTwips) #Sets character spacing in twips.
Parameters
- spacingTwips int
Returns
RtfRunpublic RtfRun SetDeletedRevision(int? authorIndex = null, int? timestampValue = null) #Marks the run as tracked deleted text.
Parameters
- authorIndex int? = null
- timestampValue int? = null
Returns
RtfRunpublic RtfRun SetDirection(RtfTextDirection? direction) #Sets explicit run text direction.
Parameters
- direction OfficeIMO.Rtf.RtfTextDirection?
Returns
RtfRunpublic RtfRun SetDoubleStrikethrough(bool value = true) #Enables double strike-through formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetEmboss(bool value = true) #Enables embossed text formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetFontSize(double points) #Sets the run font size in points.
Parameters
- points double
Returns
RtfRunpublic RtfRun SetForegroundColor(int colorIndex) #Sets the foreground color table index.
Parameters
- colorIndex int
Returns
RtfRunpublic RtfRun SetHighlightColor(int colorIndex) #Sets the highlight color table index.
Parameters
- colorIndex int
Returns
RtfRunpublic RtfRun SetHyperlink(Uri uri) #Marks the run as a hyperlink.
Parameters
- uri System.Uri
Returns
RtfRunpublic RtfRun SetImprint(bool value = true) #Enables engraved/imprinted text formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetInsertedRevision(int? authorIndex = null, int? timestampValue = null) #Marks the run as tracked inserted text.
Parameters
- authorIndex int? = null
- timestampValue int? = null
Returns
RtfRunpublic RtfRun SetItalic(bool value = true) #Enables italic formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetKerningHalfPoints(int halfPoints) #Sets the kerning threshold in half-points.
Parameters
- halfPoints int
Returns
RtfRunpublic RtfRun SetLanguage(int languageId) #Sets the run language LCID.
Parameters
- languageId int
Returns
RtfRunpublic RtfRun SetNote(RtfNote note) #Attaches a footnote or annotation to this run.
Parameters
- note OfficeIMO.Rtf.RtfNote
Returns
RtfRunpublic RtfRun SetOutline(bool value = true) #Enables outline text formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetRevisionSaveIds(int? character = null, int? insertion = null, int? deletion = null) #Sets run-level revision save identifiers.
Parameters
- character int? = null
- insertion int? = null
- deletion int? = null
Returns
RtfRunpublic RtfRun SetShadow(bool value = true) #Enables shadow text formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetStrikethrough(bool value = true) #Enables strike-through formatting.
Parameters
- value bool = true
Returns
RtfRunpublic RtfRun SetStyle(int styleId) #Sets the character style id.
Parameters
- styleId int
Returns
RtfRunpublic RtfRun SetUnderlineColor(int colorIndex) #Sets the underline color table index.
Parameters
- colorIndex int
Returns
RtfRunInherited Methods
Properties
public bool UseDefaultCharacterFormatting { get; set; } #Whether a native plain reset selects document defaults beneath this run's direct and character-style formatting.
public bool? DirectBold { get; set; } #Authored Bold override. Null inherits from the selected style; an explicit default clears that style value.
public bool? DirectItalic { get; set; } #Authored Italic override. Null inherits from the selected style; an explicit default clears that style value.
public bool Underline { get; set; } #Whether the run is underlined. Setting this property uses single underline when enabled.
public RtfUnderlineStyle? DirectUnderlineStyle { get; set; } #Authored UnderlineStyle override. Null inherits from the selected style; an explicit default clears that style value.
public bool DoubleStrikethrough { get; set; } #Whether the run uses double strikethrough.
public RtfCapsStyle CapsStyle { get; set; } #Optional all-caps or small-caps character effect.
public RtfVerticalPosition VerticalPosition { get; set; } #Optional superscript or subscript positioning.
public int? HighlightColorIndex { get; set; } #Optional background highlight color index.
public int? CharacterBackgroundColorIndex { get; set; } #One-based color table index used by character background shading.
public int? CharacterShadingForegroundColorIndex { get; set; } #One-based color table index used by character pattern foreground shading.
public int? 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; private set; } #Character border metadata represented by \chbrdr and following border controls.
public int? UnderlineColorIndex { get; set; } #Optional underline color table index. A null value uses the document default.
public int? CharacterSpacingTwips { get; set; } #Optional character spacing in twips. Positive values expand text and negative values condense it.
public int? CharacterScalePercent { get; set; } #Optional character scale percentage. A null value uses the document default of 100 percent.
public int? KerningHalfPoints { get; set; } #Optional kerning threshold in half-points.
public int? CharacterOffsetHalfPoints { get; set; } #Optional signed baseline offset in half-points. Positive values raise text and negative values lower it.
public RtfTextDirection? Direction { get; set; } #Explicit run text direction represented by \ltrch or \rtlch.
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 int? RevisionAuthorIndex { get; set; } #Optional zero-based index into the document revision author table.
public int? RevisionTimestampValue { get; set; } #Optional raw RTF DTTM revision timestamp value from \revdttm.
public int? CharacterRevisionSaveId { get; set; } #Character revision save identifier represented by \charrsid.
public int? InsertionRevisionSaveId { get; set; } #Insertion revision save identifier represented by \insrsid.
public int? DeletionRevisionSaveId { get; set; } #Deletion revision save identifier represented by \delrsid.