API Reference
OfficeRichTextSegment
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
- Property OfficeRichTextLine.Segments
Accepted by parameters
- Constructor OfficeRichTextLine.OfficeRichTextLine
- Constructor OfficeRichTextLine.OfficeRichTextLine
- Method OfficeTextBlockRenderer.AppendSvgRichTextSegment
Constructors
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
- 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 System.Nullable{OfficeIMO.Drawing.OfficeColor}
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
- 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 System.Nullable{OfficeIMO.Drawing.OfficeColor} = null
- underlineStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None
- strikethroughStyle OfficeIMO.Drawing.OfficeTextDecorationStyle = None
- baseline OfficeIMO.Drawing.OfficeTextBaseline = Normal
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
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.