API Reference
Class
OfficeRichTextSegment
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, Boolean bold, Boolean italic, Boolean underline, String fontFamily, Boolean strikethrough, OfficeColor? backgroundColor) #Creates a measured segment using the pre-typography constructor signature.
Parameters
- text System.String
- width System.Double
- fontSize System.Double
- color OfficeIMO.Drawing.OfficeColor
- bold System.Boolean
- italic System.Boolean
- underline System.Boolean
- fontFamily System.String
- strikethrough System.Boolean
- backgroundColor OfficeIMO.Drawing.OfficeColor?
public OfficeRichTextSegment(String text, Double width, Double fontSize, OfficeColor color, Boolean bold, Boolean italic, Boolean underline, String fontFamily, Boolean strikethrough = false, OfficeColor? backgroundColor = null, OfficeTextDecorationStyle underlineStyle = None, OfficeTextDecorationStyle strikethroughStyle = None, OfficeTextBaseline baseline = Normal) #Creates a measured rich text segment.
Parameters
- text System.String
- width System.Double
- fontSize System.Double
- color OfficeIMO.Drawing.OfficeColor
- bold System.Boolean
- italic System.Boolean
- underline System.Boolean
- fontFamily System.String
- strikethrough System.Boolean = false
- backgroundColor OfficeIMO.Drawing.OfficeColor? = null
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None
- baseline OfficeIMO.Drawing.OfficeTextBaseline = Normal
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
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 OfficeColor? BackgroundColor { get; } #Gets the optional segment background/highlight color.