Search Results for

    Show / Hide Table of Contents

    Class Shading

    Inheritance
    System.Object
    Shading
    Implements
    IShading
    Namespace: IronPPT.Models
    Assembly: IronPPT.dll
    Syntax
    public class Shading : Object, IShading

    When a paragraph or shape needs a filled background rather than a flat single color, Shading describes that fill. It captures the foreground color, the background fill, and the pattern that weaves between them, so a developer can give a block of slide content a tinted or hatched backdrop instead of a plain block of color.

    A Shading is built and attached wherever an element accepts background shading, and its properties divide into two groups. The direct-color group is Color (the foreground), Fill (the background), and ShadingPattern, a Nullable<ShadingPatternValues> that selects the weave (solid, a percentage screen, or a hatch) between the two. The theme group lets the fill follow the presentation's theme rather than fixed values: ThemeColor, ThemeFill, and ThemeFillShade are IColor slots resolved against the active theme, while ThemeFillTint and ThemeTint are string adjustments that lighten or darken those theme colors.

    Set Color and Fill to IColor values for a hard-coded look, or set the theme slots when the shading should track a corporate template so a re-themed deck restyles automatically. Because ShadingPattern is nullable, leaving it unset means no pattern is applied and the fill reads as a plain color, while assigning a member of ShadingPatternValues turns on the weave. Combining a ShadingPattern with contrasting Color and Fill is what produces the classic hatched or screened background. The ThemeFillShade slot is worth noting separately from ThemeFill: it holds the shaded variant of the theme fill, so a darker accent can be derived from the same theme color rather than picked by hand. Mixing the direct-color group and the theme group on one Shading is allowed, but a deck meant to survive re-theming should lean on the theme slots throughout.

    var shading = new Shading();
    shading.Color = someColor;
    shading.Fill = backgroundColor;
    shading.ShadingPattern = ShadingPatternValues.Solid;

    The add shape example sets shape fill and outline colors, the paragraph style example styles paragraph appearance, and the add paragraph example builds the content a fill sits behind.

    Constructors

    Shading()

    Declaration
    public Shading()

    Properties

    Color

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

    Fill

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

    ShadingPattern

    Declaration
    public Nullable<ShadingPatternValues> ShadingPattern { get; set; }
    Property Value
    Type Description
    System.Nullable<ShadingPatternValues>

    ThemeColor

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

    ThemeFill

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

    ThemeFillShade

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

    ThemeFillTint

    Declaration
    public string ThemeFillTint { get; set; }
    Property Value
    Type Description
    System.String

    ThemeTint

    Declaration
    public string ThemeTint { get; set; }
    Property Value
    Type Description
    System.String

    Implements

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