Search Results for

    Show / Hide Table of Contents

    Interface IElementPosition

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

    Placing a shape, image, or text box at a precise spot on a slide runs through IElementPosition. The contract exposes an X and a Y, each typed as IDocUnit, so a coordinate can be read or set in whichever measurement unit the surrounding layout code uses, inches, points, EMU, and the rest. Coding against the contract keeps positioning logic uniform across element types.

    The concrete implementor in IronPPT is ElementPosition, the object that holds an element's location on its slide. Because X and Y are IDocUnit values rather than plain numbers, a developer assigns a position by setting the unit that matches the value at hand and can read the same coordinate back in a different unit. A developer usually receives a position from the element being laid out rather than constructing it, then adjusts X and Y to move the element.

    position.X.Inch = 1.0;
    position.Y.Inch = 2.0;

    The slide element tutorial positions elements on a slide, and the add shape example places shapes at set coordinates.

    Properties

    X

    Declaration
    IDocUnit X { get; set; }
    Property Value
    Type Description
    IDocUnit

    Y

    Declaration
    IDocUnit Y { get; set; }
    Property Value
    Type Description
    IDocUnit
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet