Class
OfficeRichTextSegment
OfficeIMO.Drawing
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
- Property OfficeRichTextLine.Segments
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
- width double
- fontSize double
- color OfficeIMO.OfficeColor
- bold bool
- italic bool
- underline bool
- fontFamily string
- strikethrough bool
- backgroundColor OfficeIMO.OfficeColor?
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
- width double
- fontSize double
- color OfficeIMO.OfficeColor
- bold bool
- italic bool
- underline bool
- fontFamily string
- strikethrough bool = false
- backgroundColor OfficeIMO.OfficeColor? = null
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None
- baseline OfficeIMO.Drawing.OfficeTextBaseline = Normal
Inherited Methods
Properties
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 OfficeColor? BackgroundColor { get; } #Gets the optional segment background/highlight color.