Search Results for

    Show / Hide Table of Contents

    Interface IPercentage

    Namespace: IronPPT.Interfaces
    Assembly: IronPPT.dll
    Syntax
    public interface IPercentage

    IPercentage is the value a developer reads or sets when a slide property is expressed as a proportion rather than an absolute measurement, the kind of figure used for a color saturation, a scale factor, or a relative width. Wrapping the number in a contract rather than passing a bare double keeps proportion values distinct from point or pixel measurements, so a property typed as IPercentage cannot be confused with one typed as a unit. Lean on the FAQ to place it against IDocUnit, the absolute-measurement contract it sits beside.

    A developer usually receives an IPercentage from the property that exposes it rather than constructing one. The concrete implementor in IronPPT is Percentage, and the contract carries a single nullable Value of type double so an unset proportion reads as null instead of zero. ToString renders the value for display or logging. Reading Value gives the current proportion; assigning it changes the proportion the consuming property applies.

    IPercentage saturation = new Percentage();
    saturation.Value = 75.0;

    The paragraph style example and the add shape example show properties that take proportional values.

    Properties

    Value

    Declaration
    Nullable<double> Value { get; set; }
    Property Value
    Type Description
    System.Nullable<System.Double>

    Methods

    ToString()

    Declaration
    string ToString()
    Returns
    Type Description
    System.String
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet