Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeRichTextSegment

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers sealed

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

Inheritance

  • Object
  • OfficeRichTextSegment

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

Accepted by parameters

Constructors

OfficeRichTextSegment 2 overloads
public OfficeRichTextSegment(String text, Double width, Double fontSize, OfficeColor color, Boolean bold, Boolean italic, Boolean underline, String fontFamily, Boolean strikethrough, Nullable<OfficeColor> backgroundColor) #

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

Parameters

text System.String requiredposition: 0
width System.Double requiredposition: 1
fontSize System.Double requiredposition: 2
color OfficeIMO.Drawing.OfficeColor requiredposition: 3
bold System.Boolean requiredposition: 4
italic System.Boolean requiredposition: 5
underline System.Boolean requiredposition: 6
fontFamily System.String requiredposition: 7
strikethrough System.Boolean requiredposition: 8
backgroundColor System.Nullable{OfficeIMO.Drawing.OfficeColor} requiredposition: 9
public OfficeRichTextSegment(String text, Double width, Double fontSize, OfficeColor color, Boolean bold, Boolean italic, Boolean underline, String fontFamily, Boolean strikethrough = false, Nullable<OfficeColor> backgroundColor = null, OfficeTextDecorationStyle underlineStyle = None, OfficeTextDecorationStyle strikethroughStyle = None, OfficeTextBaseline baseline = Normal) #

Creates a measured rich text segment.

Parameters

text System.String requiredposition: 0
width System.Double requiredposition: 1
fontSize System.Double requiredposition: 2
color OfficeIMO.Drawing.OfficeColor requiredposition: 3
bold System.Boolean requiredposition: 4
italic System.Boolean requiredposition: 5
underline System.Boolean requiredposition: 6
fontFamily System.String requiredposition: 7
strikethrough System.Boolean = false optionalposition: 8
backgroundColor System.Nullable{OfficeIMO.Drawing.OfficeColor} = null optionalposition: 9
underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None optionalposition: 10
strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None optionalposition: 11
baseline OfficeIMO.Drawing.OfficeTextBaseline = Normal optionalposition: 12

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 Boolean Bold { get; } #

Gets whether the segment should render as bold.

public Boolean Italic { get; } #

Gets whether the segment should render as italic.

public Boolean Underline { get; } #

Gets whether the segment should render with underline.

public OfficeTextDecorationStyle UnderlineStyle { get; } #

Gets the underline line pattern.

public Boolean 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 Nullable<OfficeColor> BackgroundColor { get; } #

Gets the optional segment background/highlight color.