Class Underline
Inheritance
System.Object
Underline
Assembly: IronPPT.dll
Syntax
public class Underline : Object, IUnderline
Underline is the underline stroke a text run carries, the concrete record of how the line beneath the text looks. It describes the line's pattern, fill, and color, so a developer who wants more than a plain solid underline, a colored line, a gradient fill, or a dashed pattern, configures it here. A run reaches its underline through the Underline property of its TextStyle, which is typed as the IUnderline contract this class implements.
The stroke is built and then assigned to the run's style, so a developer sets the properties that matter and leaves the rest unset, since most are nullable and fall back to the rendered default. Clone copies an existing underline when one run's line should seed another.
LineValue chooses the underline kind from UnderlineValues (single, double, and the other documented patterns) as a nullable value, so leaving it unset keeps the inherited line. Color takes an IColor for the line color, and GradientFill supplies an IGradient when the line should fade across a range rather than use a flat color. FillColorFollowText ties the line color to the text color, NoFill suppresses the fill entirely, and LineJoinBevel controls how the stroke joins. PresetDash selects a dash pattern from PresetLineDashValues for a dotted or dashed underline. Because each is nullable, set only the aspects that differ from the default underline.
var underline = new Underline();
underline.LineValue = UnderlineValues.Single;
underline.Color = new Color("#0066CC");
The add text how-to covers styling text on a slide, the paragraph style example shows run formatting in a worked slide, and the TextStyle reference shows the style that exposes this underline.
Constructors
Underline()
Declaration
Properties
Color
Declaration
public IColor Color { get; set; }
Property Value
FillColorFollowText
Declaration
public Nullable<bool> FillColorFollowText { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.Boolean> |
|
GradientFill
Declaration
public IGradient GradientFill { get; set; }
Property Value
LineJoinBevel
Declaration
public Nullable<bool> LineJoinBevel { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.Boolean> |
|
LineValue
Declaration
public Nullable<UnderlineValues> LineValue { get; set; }
Property Value
NoFill
Declaration
public Nullable<bool> NoFill { get; set; }
Property Value
| Type |
Description |
| System.Nullable<System.Boolean> |
|
PresetDash
Declaration
public Nullable<PresetLineDashValues> PresetDash { get; set; }
Property Value
Methods
Clone()
Declaration
public IUnderline Clone()
Returns
Implements