[]
Represents a floating container in a worksheet drawing layer.
This interface defines the common position and size members for floating objects such as shapes, charts, and pictures. It provides coordinates and dimensions in worksheet units through methods such as Top, Left, Width, and Height, and also provides pixel-based variants for the same measurements.
Objects that implement IContainer are typically obtained from drawing APIs that return related interfaces such as IShape.
public interface IContainer
Public Interface IContainer
IContainer container = worksheet.Shapes.AddShape(AutoShapeType.Rectangle, 20, 30, 120, 60);
container.Top = 40;
container.Left = 50;
double width = container.Width;
| Name | Description |
|---|---|
| Height | Gets or sets the height of the object. This value is measured in worksheet units. Use HeightInPixel to retrieve the height in pixels. |
| HeightInPixel | Gets or sets the height (in pixels) of the object. Use this method to retrieve the pixel-based height of a floating object such as a shape, chart, or picture. |
| Left | Gets or sets the distance from the left edge of the object to the left edge of column A. |
| LeftInPixel | Gets or sets the distance (in pixels) from the left edge of the object to the left edge of column A (on a worksheet) or the left edge of the chart area (on a chart). |
| Top | Gets or sets the distance from the top edge of the object to the top edge of the worksheet. |
| TopInPixel | Gets or sets the distance (in pixels) from the top edge of the object to the top edge of the worksheet. |
| Width | Gets or sets the width of the object. This value is measured in worksheet units. Use WidthInPixel to retrieve the width in pixels. |
| WidthInPixel | Gets or sets the width (in pixels) of the object. Use this method to retrieve the pixel-based width of a floating object such as a shape, chart, or picture. |