Skip to content

Class ExcelDrawingAsType

Namespace: OfficeOpenXml.Drawing
Assembly: EPPlus.dll

Provides a simple way to type cast drawing object top its top level class.

public class ExcelDrawingAsType

Inheritance

object ← ExcelDrawingAsType

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Properties

Chart

An object that containing properties that type-casts the drawing to a chart.

public ExcelChartAsType Chart { get; }

Property Value

ExcelChartAsType

Control

Helps to cast drawings to controls. Use the properties of this class to cast to the various specific control types.

public ExcelControlAsType Control { get; }

Property Value

ExcelControlAsType

Picture

Returns the drawing as a picture/image. If this drawing is not a picture, null will be returned

public ExcelPicture Picture { get; }

Property Value

ExcelPicture

Shape

Returns the drawing as a shape. If this drawing is not a shape, null will be returned

public ExcelShape Shape { get; }

Property Value

ExcelShape

Slicer

An object that containing properties that type-casts the drawing to a slicer.

public ExcelSlicerAsType Slicer { get; }

Property Value

ExcelSlicerAsType

Methods

Type<T>()

Converts the drawing to it's top level or other nested drawing class.

public T Type<T>() where T : ExcelDrawing

Returns

T

The drawing as type T

Type Parameters

T

The type of drawing. T must be inherited from ExcelDrawing