Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeRichTextSegment

OfficeIMO.Drawing

Namespace
OfficeIMO.Drawing
Assembly
OfficeIMO.Core
Source revision
ba882f6b0d07 with working tree changes
Modifiers
sealed

Describes one measured rich text segment on a laid-out line.

Inheritance

  • object
  • OfficeRichTextSegment

Usage

Explore 3 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 1

Accepted by parameters 2

Constructors

OfficeRichTextSegment 2 overloads
public OfficeRichTextSegment(string text, double width, double fontSize, OfficeColor color, bool bold, bool italic, bool underline, string fontFamily, bool strikethrough, OfficeColor? backgroundColor) #

Creates a measured segment using the pre-typography constructor signature.

Parameters

text string required
width double required
fontSize double required
color OfficeIMO.OfficeColor required
bold bool required
italic bool required
underline bool required
fontFamily string required
strikethrough bool required
backgroundColor OfficeIMO.OfficeColor? required
public OfficeRichTextSegment(string text, double width, double fontSize, OfficeColor color, bool bold, bool italic, bool underline, string fontFamily, bool strikethrough = false, OfficeColor? backgroundColor = null, OfficeTextDecorationStyle underlineStyle = None, OfficeTextDecorationStyle strikethroughStyle = None, OfficeTextBaseline baseline = Normal) #

Creates a measured rich text segment.

Parameters

text string required
width double required
fontSize double required
color OfficeIMO.OfficeColor required
bold bool required
italic bool required
underline bool required
fontFamily string required
strikethrough bool = false optional
backgroundColor OfficeIMO.OfficeColor? = null optional
underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None optional
strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None optional
baseline OfficeIMO.Drawing.OfficeTextBaseline = Normal optional

Properties

public string Text { get; } #

Gets the segment text.

public double Width { get; } #

Gets the measured segment width.

public double FontSize { get; } #

Gets the segment font size.

public OfficeColor Color { get; } #

Gets the segment color.

public bool Bold { get; } #

Gets whether the segment should render as bold.

public bool Italic { get; } #

Gets whether the segment should render as italic.

public bool Underline { get; } #

Gets whether the segment should render with underline.

public OfficeTextDecorationStyle UnderlineStyle { get; } #

Gets the underline line pattern.

public bool Strikethrough { get; } #

Gets whether the segment should render with strikethrough.

public OfficeTextDecorationStyle StrikethroughStyle { get; } #

Gets the strikethrough line pattern.

public OfficeTextBaseline Baseline { get; } #

Gets the vertical baseline placement.

public string FontFamily { get; } #

Gets the segment font family.

public OfficeColor? BackgroundColor { get; } #

Gets the optional segment background/highlight color.