API Reference
RtfStyle
Minimal semantic representation of an RTF stylesheet entry.
Inheritance
- Object
- RtfStyle
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.AddStyle
- Property RtfDocument.Styles
- Method RtfStyle.SetBorder
- Method RtfStyle.SetFrame
- Method RtfStyle.SetLegacyNumbering
Constructors
public RtfStyle(Int32 id, String name, RtfStyleKind kind = Paragraph) #Creates a stylesheet entry.
Parameters
- id System.Int32
- name System.String
- kind OfficeIMO.Rtf.RtfStyleKind = Paragraph
Methods
public RtfTabStop AddTabStop(Int32 positionTwips, RtfTabAlignment alignment = Left, RtfTabLeader leader = None) #RtfTabStopAdds a paragraph tab stop to this stylesheet entry.
Parameters
- positionTwips System.Int32
- alignment OfficeIMO.Rtf.RtfTabAlignment = Left
- leader OfficeIMO.Rtf.RtfTabLeader = None
public RtfStyle SetBorder(RtfParagraphBorderSide side, RtfParagraphBorderStyle style, Nullable<Int32> width = null, Nullable<Int32> colorIndex = null) #RtfStyleSets paragraph border formatting for one stylesheet side.
Parameters
- side OfficeIMO.Rtf.RtfParagraphBorderSide
- style OfficeIMO.Rtf.RtfParagraphBorderStyle
- width System.Nullable{System.Int32} = null
- colorIndex System.Nullable{System.Int32} = null
public RtfStyle SetFrame(Action<RtfParagraphFrame> configure) #RtfStyleConfigures absolute positioning frame metadata for this stylesheet entry.
Parameters
- configure System.Action{OfficeIMO.Rtf.RtfParagraphFrame}
public RtfStyle SetLegacyNumbering(Action<RtfLegacyNumbering> configure) #RtfStyleConfigures Word 6/95 legacy paragraph numbering metadata for this style.
Parameters
- configure System.Action{OfficeIMO.Rtf.RtfLegacyNumbering}
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public String Name { get; set; } #Human-readable style name.
public Nullable<Int32> BasedOnStyleId { get; set; } #Optional base style id.
public Nullable<Int32> NextStyleId { get; set; } #Optional next paragraph style id.
public Nullable<Int32> LinkedStyleId { get; set; } #Optional linked style id.
public Nullable<Int32> ListId { get; set; } #Optional list-instance reference inherited by paragraphs using this style.
public Nullable<Int32> ListLevel { get; set; } #Optional zero-based list level inherited by paragraphs using this style.
public RtfStyleKeyCode KeyCode { get; set; } #Optional shortcut key metadata from the stylesheet {\*\keycode ...} group.
public Boolean Additive { get; set; } #Whether the style is marked as additive.
public Boolean AutoUpdate { get; set; } #Whether this style automatically updates from document content.
public Boolean Locked { get; set; } #Whether this style is locked against modification.
public Boolean Personal { get; set; } #Whether this style is marked as a personal e-mail style.
public Boolean Compose { get; set; } #Whether this style is marked as an e-mail compose style.
public Boolean Reply { get; set; } #Whether this style is marked as an e-mail reply style.
public Boolean UnhideWhenUsed { get; set; } #Whether this style is unhidden after use.
public Boolean QuickFormat { get; set; } #Whether this style appears in quick style galleries.
public Nullable<Int32> Priority { get; set; } #Optional style priority.
public Nullable<Int32> RevisionSaveId { get; set; } #Optional style revision save id.
public Nullable<Boolean> Bold { get; set; } #Optional direct bold setting carried by the stylesheet entry.
public Nullable<Boolean> Italic { get; set; } #Optional direct italic setting carried by the stylesheet entry.
public Nullable<RtfUnderlineStyle> UnderlineStyle { get; set; } #Optional direct underline setting carried by the stylesheet entry.
public Nullable<Double> FontSize { get; set; } #Optional direct font size in points carried by the stylesheet entry.
public Nullable<Int32> FontId { get; set; } #Optional direct font id carried by the stylesheet entry.
public Nullable<Int32> ForegroundColorIndex { get; set; } #Optional direct foreground color table index carried by the stylesheet entry.
public Nullable<Int32> HighlightColorIndex { get; set; } #Optional direct highlight color table index carried by the stylesheet entry.
public IReadOnlyList<RtfTabStop> TabStops { get; } #Paragraph tab stops carried by the stylesheet entry.
public Nullable<RtfTextAlignment> ParagraphAlignment { get; set; } #Optional direct paragraph alignment carried by the stylesheet entry.
public Nullable<RtfTextDirection> ParagraphDirection { get; set; } #Optional direct paragraph text direction carried by the stylesheet entry.
public Nullable<Int32> LeftIndentTwips { get; set; } #Optional left paragraph indentation in twips carried by the stylesheet entry.
public Nullable<Int32> RightIndentTwips { get; set; } #Optional right paragraph indentation in twips carried by the stylesheet entry.
public Nullable<Int32> FirstLineIndentTwips { get; set; } #Optional first-line paragraph indentation in twips carried by the stylesheet entry.
public Nullable<Int32> SpaceBeforeTwips { get; set; } #Optional space before paragraph in twips carried by the stylesheet entry.
public Nullable<Int32> SpaceAfterTwips { get; set; } #Optional space after paragraph in twips carried by the stylesheet entry.
public Nullable<Boolean> SpaceBeforeAuto { get; set; } #Optional automatic space-before setting carried by the stylesheet entry.
public Nullable<Boolean> SpaceAfterAuto { get; set; } #Optional automatic space-after setting carried by the stylesheet entry.
public Nullable<Int32> LineSpacingTwips { get; set; } #Optional raw RTF line spacing value carried by the stylesheet entry.
public Nullable<Boolean> LineSpacingMultiple { get; set; } #Optional line spacing multiplier flag carried by the stylesheet entry.
public Nullable<Int32> BackgroundColorIndex { get; set; } #Optional paragraph background color table index carried by the stylesheet entry.
public Nullable<Int32> ShadingForegroundColorIndex { get; set; } #Optional paragraph pattern foreground color table index carried by the stylesheet entry.
public Nullable<Int32> ShadingPatternPercent { get; set; } #Optional raw paragraph shading percentage carried by the stylesheet entry.
public RtfShadingPattern ShadingPattern { get; set; } #Optional paragraph shading pattern carried by the stylesheet entry.
public RtfParagraphBorder TopBorder { get; set; } #Top paragraph border carried by the stylesheet entry.
public RtfParagraphBorder LeftBorder { get; set; } #Left paragraph border carried by the stylesheet entry.
public RtfParagraphBorder BottomBorder { get; set; } #Bottom paragraph border carried by the stylesheet entry.
public RtfParagraphBorder RightBorder { get; set; } #Right paragraph border carried by the stylesheet entry.
public Nullable<Boolean> PageBreakBefore { get; set; } #Optional page-break-before setting carried by the stylesheet entry.
public Nullable<Boolean> KeepWithNext { get; set; } #Optional keep-with-next setting carried by the stylesheet entry.
public Nullable<Boolean> KeepLinesTogether { get; set; } #Optional keep-lines-together setting carried by the stylesheet entry.
public Nullable<Boolean> SuppressLineNumbers { get; set; } #Optional line-number suppression setting carried by the stylesheet entry.
public Nullable<Boolean> AutoHyphenation { get; set; } #Optional paragraph automatic hyphenation setting carried by the stylesheet entry.
public Nullable<Boolean> ContextualSpacing { get; set; } #Optional contextual spacing setting carried by the stylesheet entry.
public Nullable<Boolean> AdjustRightIndent { get; set; } #Optional automatic right-indent adjustment setting carried by the stylesheet entry.
public Nullable<Boolean> SnapToLineGrid { get; set; } #Optional snap-to-line-grid setting carried by the stylesheet entry.
public Nullable<Boolean> WidowControl { get; set; } #Optional widow/orphan control setting carried by the stylesheet entry.
public Nullable<Int32> OutlineLevel { get; set; } #Optional paragraph outline level carried by the stylesheet entry.
public RtfLegacyNumbering LegacyNumbering { get; set; } #Word 6/95 legacy paragraph numbering metadata carried by this stylesheet entry.
public RtfParagraphFrame Frame { get; set; } #Absolute positioning, text wrapping, and drop-cap metadata carried by the stylesheet entry.
public RtfTableRow TableRowFormat { get; set; } #Table row and cell formatting carried by a table stylesheet entry.