GemBox.Spreadsheet
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    ExcelDrawingPosition Class

    Namespace:
    GemBox.Spreadsheet
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a class which holds information about position and size of the ExcelDrawing (picture, chart, etc.) in the worksheet.

    • C#
    • VB.NET
    public sealed class ExcelDrawingPosition
    Public NotInheritable Class ExcelDrawingPosition
    Inheritance:
    System.Object
    ExcelDrawingPosition

    Properties

    From

    Gets or sets the anchor cell which the ExcelDrawing (picture, chart, etc.) spans from.

    • C#
    • VB.NET
    public AnchorCell From { get; set; }
    Public Property From As AnchorCell
    Property Value
    AnchorCell

    The anchor cell which the ExcelDrawing (picture, chart, etc.) spans from.

    Remarks

    If Position.Mode is FreeFloating, then:

    • getter returns new instance of AnchorCell for every request and changing that instance won't affect on the position of the drawing (picture, chart, etc.).
    • setter will internally set Left and Top properties, which are calculated by using Widths and Heights of columns and rows in the worksheet.

    Height

    Gets or sets the height (in points) of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public double Height { get; set; }
    Public Property Height As Double
    Property Value
    System.Double

    The height (in points) of the ExcelDrawing (picture, chart, etc.).

    Remarks

    If Position.Mode is MoveAndSize, then:

    • getter calculates the height for every request by using Heights of rows in the worksheet.
    • setter will internally set To property.

    Left

    Gets or sets the distance (in points) of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.

    • C#
    • VB.NET
    public double Left { get; set; }
    Public Property Left As Double
    Property Value
    System.Double

    The distance (in points) of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.

    Remarks

    If Position.Mode is Move or MoveAndSize, then:

    • getter calculates the distance from the left edge of the worksheet for every request by using Widths of columns in the worksheet.
    • setter will internally set From property.

    Mode

    Gets or sets the positioning mode of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public PositioningMode Mode { get; set; }
    Public Property Mode As PositioningMode
    Property Value
    PositioningMode

    The positioning mode of the ExcelDrawing (picture, chart, etc.).

    To

    Gets or sets the anchor cell which the ExcelDrawing (picture, chart, etc.) spans to.

    • C#
    • VB.NET
    public AnchorCell To { get; set; }
    Public Property To As AnchorCell
    Property Value
    AnchorCell

    The anchor cell which the ExcelDrawing (picture, chart, etc.) spans to.

    Remarks

    If Position.Mode is FreeFloating or Move, then:

    • getter returns new instance of AnchorCell for every request and changing that instance won't affect on the position of the drawing (picture, chart, etc.).
    • setter will internally set Width and Height properties, which are calculated by using Widths and Heights of columns and rows in the worksheet.

    Top

    Gets or sets the distance (in points) of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.

    • C#
    • VB.NET
    public double Top { get; set; }
    Public Property Top As Double
    Property Value
    System.Double

    The distance (in points) of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.

    Remarks

    If Position.Mode is Move or MoveAndSize, then:

    • getter calculates the distance from the top edge of the worksheet for every request by using Heights of rows in the worksheet.
    • setter will internally set From property.

    Width

    Gets or sets the width (in points) of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public double Width { get; set; }
    Public Property Width As Double
    Property Value
    System.Double

    The width (in points) of the ExcelDrawing (picture, chart, etc.).

    Remarks

    If Position.Mode is MoveAndSize, then:

    • getter calculates the width for every request by using Widths of columns in the worksheet.
    • setter will internally set To property.

    Methods

    GetHeight(LengthUnit)

    Gets the height of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public double GetHeight(LengthUnit unit)
    Public Function GetHeight(unit As LengthUnit) As Double
    Parameters
    unit
    LengthUnit

    The length unit of the returned value.

    Returns
    System.Double

    The height of the ExcelDrawing (picture, chart, etc.).

    Remarks

    If Position.Mode is MoveAndSize, then:

    • getter calculates the height for every request by using Heights of rows in the worksheet.
    • setter will internally set To property.

    GetLeft(LengthUnit)

    Gets the distance of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.

    • C#
    • VB.NET
    public double GetLeft(LengthUnit unit)
    Public Function GetLeft(unit As LengthUnit) As Double
    Parameters
    unit
    LengthUnit

    The length unit of the returned value.

    Returns
    System.Double

    The distance of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.

    Remarks

    If Position.Mode is Move or MoveAndSize, then:

    • getter calculates the distance from the left edge of the worksheet for every request by using Widths of columns in the worksheet.
    • setter will internally set From property.

    GetTop(LengthUnit)

    Gets the distance of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.

    • C#
    • VB.NET
    public double GetTop(LengthUnit unit)
    Public Function GetTop(unit As LengthUnit) As Double
    Parameters
    unit
    LengthUnit

    The length unit of the returned value.

    Returns
    System.Double

    The distance of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.

    Remarks

    If Position.Mode is Move or MoveAndSize, then:

    • getter calculates the distance from the top edge of the worksheet for every request by using Heights of rows in the worksheet.
    • setter will internally set From property.

    GetWidth(LengthUnit)

    Gets the width of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public double GetWidth(LengthUnit unit)
    Public Function GetWidth(unit As LengthUnit) As Double
    Parameters
    unit
    LengthUnit

    The length unit of the returned value.

    Returns
    System.Double

    The width of the ExcelDrawing (picture, chart, etc.).

    Remarks

    If Position.Mode is MoveAndSize, then:

    • getter calculates the width for every request by using Widths of columns in the worksheet.
    • setter will internally set To property.

    SetHeight(Double, LengthUnit)

    Sets the height of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public void SetHeight(double value, LengthUnit unit)
    Public Sub SetHeight(value As Double, unit As LengthUnit)
    Parameters
    value
    System.Double

    The value.

    unit
    LengthUnit

    The length unit of the value parameter.

    Remarks

    If Position.Mode is MoveAndSize, then:

    • getter calculates the height for every request by using Heights of rows in the worksheet.
    • setter will internally set To property.

    SetLeft(Double, LengthUnit)

    Sets the distance of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.

    • C#
    • VB.NET
    public void SetLeft(double value, LengthUnit unit)
    Public Sub SetLeft(value As Double, unit As LengthUnit)
    Parameters
    value
    System.Double

    The value.

    unit
    LengthUnit

    The length unit of the value parameter.

    Remarks

    If Position.Mode is Move or MoveAndSize, then:

    • getter calculates the distance from the left edge of the worksheet for every request by using Widths of columns in the worksheet.
    • setter will internally set From property.

    SetTop(Double, LengthUnit)

    Sets the distance of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.

    • C#
    • VB.NET
    public void SetTop(double value, LengthUnit unit)
    Public Sub SetTop(value As Double, unit As LengthUnit)
    Parameters
    value
    System.Double

    The value.

    unit
    LengthUnit

    The length unit of the value parameter.

    Remarks

    If Position.Mode is Move or MoveAndSize, then:

    • getter calculates the distance from the top edge of the worksheet for every request by using Heights of rows in the worksheet.
    • setter will internally set From property.

    SetWidth(Double, LengthUnit)

    Sets the width of the ExcelDrawing (picture, chart, etc.).

    • C#
    • VB.NET
    public void SetWidth(double value, LengthUnit unit)
    Public Sub SetWidth(value As Double, unit As LengthUnit)
    Parameters
    value
    System.Double

    The value.

    unit
    LengthUnit

    The length unit of the value parameter.

    Remarks

    If Position.Mode is MoveAndSize, then:

    • getter calculates the width for every request by using Widths of columns in the worksheet.
    • setter will internally set To property.

    ToString()

    Returns a System.String that represents this ExcelDrawingPosition instance.

    • C#
    • VB.NET
    public override string ToString()
    Public Overrides Function ToString As String
    Returns
    System.String

    A System.String that represents this ExcelDrawingPosition instance.

    Overrides
    System.Object.ToString()
    Remarks

    This method should be used primarily for debugging purposes and should be considered volatile (format of its return value might change in future versions).

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.