Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfStyle

OfficeIMO.Rtf

Namespace
OfficeIMO.Rtf
Assembly
OfficeIMO.Rtf
Source revision
ba882f6b0d07 with working tree changes
Implements
IRtfCloneable
Modifiers
sealed

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.

Constructors

public RtfStyle(int id, string name, RtfStyleKind kind = Paragraph) #

Creates a stylesheet entry.

Parameters

id int required
name string required
kind OfficeIMO.Rtf.RtfStyleKind = Paragraph optional

Methods

public RtfTabStop AddTabStop(int positionTwips, RtfTabAlignment alignment = Left, RtfTabLeader leader = None) #

Adds a paragraph tab stop to this stylesheet entry.

Parameters

positionTwips int required
alignment OfficeIMO.Rtf.RtfTabAlignment = Left optional
leader OfficeIMO.Rtf.RtfTabLeader = None optional

Returns

RtfTabStop
public 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 required
style OfficeIMO.Rtf.RtfParagraphBorderStyle required
width int? = null optional
colorIndex int? = null optional

Returns

RtfStyle
public RtfStyle SetFrame(Action<RtfParagraphFrame> configure) #

Configures absolute positioning frame metadata for this stylesheet entry.

Parameters

configure System.Action<OfficeIMO.Rtf.RtfParagraphFrame> required

Returns

RtfStyle
public RtfStyle SetLegacyNumbering(Action<RtfLegacyNumbering> configure) #

Configures Word 6/95 legacy paragraph numbering metadata for this style.

Parameters

configure System.Action<OfficeIMO.Rtf.RtfLegacyNumbering> required

Returns

RtfStyle

Properties

public int Id { get; internal set; } #

RTF style id.

public string Name { get; set; } #

Human-readable style name.

public RtfStyleKind Kind { get; set; } #

Style kind.

public int? BasedOnStyleId { get; set; } #

Optional base style id.

public int? NextStyleId { get; set; } #

Optional next paragraph style id.

public int? LinkedStyleId { get; set; } #

Optional linked style id.

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 Additive { get; set; } #

Whether the style is marked as additive.

public bool AutoUpdate { get; set; } #

Whether this style automatically updates from document content.

public bool Hidden { get; set; } #

Whether this style is hidden from style lists.

public bool Locked { get; set; } #

Whether this style is locked against modification.

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 SemiHidden { get; set; } #

Whether this style is semi-hidden.

public bool UnhideWhenUsed { get; set; } #

Whether this style is unhidden after use.

public bool QuickFormat { get; set; } #

Whether this style appears in quick style galleries.

public int? Priority { get; set; } #

Optional style priority.

public int? RevisionSaveId { get; set; } #

Optional style revision save id.

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 bool? TextHidden { get; set; } #

Optional hidden-text formatting represented by \v. This is separate from style-list visibility.

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.