Search Results for

    Show / Hide Table of Contents

    Class Underline

    Inheritance
    System.Object
    Underline
    Implements
    IUnderline
    Namespace: IronPPT.Models
    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
    public Underline()

    Properties

    Color

    Declaration
    public IColor Color { get; set; }
    Property Value
    Type Description
    IColor

    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
    Type Description
    IGradient

    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
    Type Description
    System.Nullable<UnderlineValues>

    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
    Type Description
    System.Nullable<PresetLineDashValues>

    Methods

    Clone()

    Declaration
    public IUnderline Clone()
    Returns
    Type Description
    IUnderline

    Implements

    IUnderline
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet