RtfStyle
OfficeIMO.Rtf
Minimal semantic representation of an RTF stylesheet entry.
Inheritance
- object
- RtfStyle
Usage
Explore 5 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 5
- Method RtfDocument.AddStyle
- Property RtfDocument.Styles
- Method RtfStyle.SetBorder
- Method RtfStyle.SetFrame
- Method RtfStyle.SetLegacyNumbering
Constructors
public RtfStyle(int id, string name, RtfStyleKind kind = Paragraph) #Creates a stylesheet entry.
Parameters
- id int
- name string
- kind OfficeIMO.Rtf.RtfStyleKind = Paragraph
Methods
public RtfTabStop AddTabStop(int positionTwips, RtfTabAlignment alignment = Left, RtfTabLeader leader = None) #Adds a paragraph tab stop to this stylesheet entry.
Parameters
- positionTwips int
- alignment OfficeIMO.Rtf.RtfTabAlignment = Left
- leader OfficeIMO.Rtf.RtfTabLeader = None
Returns
RtfTabStoppublic RtfStyle SetBorder(RtfParagraphBorderSide side, RtfParagraphBorderStyle style, int? width = null, int? colorIndex = null) #Sets paragraph border formatting for one stylesheet side.
Parameters
- side OfficeIMO.Rtf.RtfParagraphBorderSide
- style OfficeIMO.Rtf.RtfParagraphBorderStyle
- width int? = null
- colorIndex int? = null
Returns
RtfStylepublic RtfStyle SetFrame(Action<RtfParagraphFrame> configure) #Configures absolute positioning frame metadata for this stylesheet entry.
Parameters
- configure System.Action<OfficeIMO.Rtf.RtfParagraphFrame>
Returns
RtfStyleInherited Methods
Properties
public int? ListId { get; set; } #Optional list-instance reference inherited by paragraphs using this style.
public int? 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 bool AutoUpdate { get; set; } #Whether this style automatically updates from document content.
public bool Personal { get; set; } #Whether this style is marked as a personal e-mail style.
public bool Compose { get; set; } #Whether this style is marked as an e-mail compose style.
public bool Reply { get; set; } #Whether this style is marked as an e-mail reply style.
public bool QuickFormat { get; set; } #Whether this style appears in quick style galleries.
public bool? Bold { get; set; } #Optional direct bold setting carried by the stylesheet entry.
public bool? Italic { get; set; } #Optional direct italic setting carried by the stylesheet entry.
public RtfUnderlineStyle? UnderlineStyle { get; set; } #Optional direct underline setting carried by the stylesheet entry.
public double? FontSize { get; set; } #Optional direct font size in points carried by the stylesheet entry.
public int? FontId { get; set; } #Optional direct font id carried by the stylesheet entry.
public int? ForegroundColorIndex { get; set; } #Optional direct foreground color table index carried by the stylesheet entry.
public int? 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 RtfTextAlignment? ParagraphAlignment { get; set; } #Optional direct paragraph alignment carried by the stylesheet entry.
public RtfTextDirection? ParagraphDirection { get; set; } #Optional direct paragraph text direction carried by the stylesheet entry.
public int? LeftIndentTwips { get; set; } #Optional left paragraph indentation in twips carried by the stylesheet entry.
public int? RightIndentTwips { get; set; } #Optional right paragraph indentation in twips carried by the stylesheet entry.
public int? FirstLineIndentTwips { get; set; } #Optional first-line paragraph indentation in twips carried by the stylesheet entry.
public int? SpaceBeforeTwips { get; set; } #Optional space before paragraph in twips carried by the stylesheet entry.
public int? SpaceAfterTwips { get; set; } #Optional space after paragraph in twips carried by the stylesheet entry.
public bool? SpaceBeforeAuto { get; set; } #Optional automatic space-before setting carried by the stylesheet entry.
public bool? SpaceAfterAuto { get; set; } #Optional automatic space-after setting carried by the stylesheet entry.
public int? LineSpacingTwips { get; set; } #Optional raw RTF line spacing value carried by the stylesheet entry.
public bool? LineSpacingMultiple { get; set; } #Optional line spacing multiplier flag carried by the stylesheet entry.
public int? BackgroundColorIndex { get; set; } #Optional paragraph background color table index carried by the stylesheet entry.
public int? ShadingForegroundColorIndex { get; set; } #Optional paragraph pattern foreground color table index carried by the stylesheet entry.
public int? 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; private set; } #Top paragraph border carried by the stylesheet entry.
public RtfParagraphBorder LeftBorder { get; private set; } #Left paragraph border carried by the stylesheet entry.
public RtfParagraphBorder BottomBorder { get; private set; } #Bottom paragraph border carried by the stylesheet entry.
public RtfParagraphBorder RightBorder { get; private set; } #Right paragraph border carried by the stylesheet entry.
public bool? PageBreakBefore { get; set; } #Optional page-break-before setting carried by the stylesheet entry.
public bool? KeepWithNext { get; set; } #Optional keep-with-next setting carried by the stylesheet entry.
public bool? KeepLinesTogether { get; set; } #Optional keep-lines-together setting carried by the stylesheet entry.
public bool? SuppressLineNumbers { get; set; } #Optional line-number suppression setting carried by the stylesheet entry.
public bool? AutoHyphenation { get; set; } #Optional paragraph automatic hyphenation setting carried by the stylesheet entry.
public bool? ContextualSpacing { get; set; } #Optional contextual spacing setting carried by the stylesheet entry.
public bool? AdjustRightIndent { get; set; } #Optional automatic right-indent adjustment setting carried by the stylesheet entry.
public bool? SnapToLineGrid { get; set; } #Optional snap-to-line-grid setting carried by the stylesheet entry.
public bool? WidowControl { get; set; } #Optional widow/orphan control setting carried by the stylesheet entry.
public int? OutlineLevel { get; set; } #Optional paragraph outline level carried by the stylesheet entry.
public RtfLegacyNumbering LegacyNumbering { get; private set; } #Word 6/95 legacy paragraph numbering metadata carried by this stylesheet entry.
public RtfParagraphFrame Frame { get; private set; } #Absolute positioning, text wrapping, and drop-cap metadata carried by the stylesheet entry.
public RtfTableRow TableRowFormat { get; private set; } #Table row and cell formatting carried by a table stylesheet entry.