ExcelDrawingPosition Class
Represents a class which holds information about position and size of the ExcelDrawing (picture, chart, etc.) in the worksheet.
- Inheritance:
- System.ObjectExcelDrawingPosition
Properties
From
Gets or sets the anchor cell which the ExcelDrawing (picture, chart, etc.) spans from.
Property Value
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.).
Property Value
- System.Double
The height (in points) of the ExcelDrawing (picture, chart, etc.).
Remarks
If Position.Mode is MoveAndSize, then:
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.
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:
Mode
Gets or sets the positioning mode of the ExcelDrawing (picture, chart, etc.).
Property Value
The positioning mode of the ExcelDrawing (picture, chart, etc.).
To
Gets or sets the anchor cell which the ExcelDrawing (picture, chart, etc.) spans to.
Property Value
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.
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:
Width
Gets or sets the width (in points) of the ExcelDrawing (picture, chart, etc.).
Property Value
- System.Double
The width (in points) of the ExcelDrawing (picture, chart, etc.).
Remarks
If Position.Mode is MoveAndSize, then:
Methods
GetHeight(LengthUnit)
Gets the height of the ExcelDrawing (picture, chart, etc.).
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:
GetLeft(LengthUnit)
Gets the distance of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.
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:
GetTop(LengthUnit)
Gets the distance of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.
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:
GetWidth(LengthUnit)
Gets the width of the ExcelDrawing (picture, chart, etc.).
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:
SetHeight(Double, LengthUnit)
Sets the height of the ExcelDrawing (picture, chart, etc.).
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:
SetLeft(Double, LengthUnit)
Sets the distance of the left edge of the ExcelDrawing (picture, chart, etc.) from the left edge of the worksheet.
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:
SetTop(Double, LengthUnit)
Sets the distance of the top edge of the ExcelDrawing (picture, chart, etc.) from the top edge of the worksheet.
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:
SetWidth(Double, LengthUnit)
Sets the width of the ExcelDrawing (picture, chart, etc.).
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:
ToString()
Returns a System.String that represents this ExcelDrawingPosition instance.
Returns
- System.String
A System.String that represents this ExcelDrawingPosition instance.
Overrides
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).