Skip to content

Class ExcelControlAsType

Namespace: OfficeOpenXml.Drawing
Assembly: EPPlus.dll

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

public class ExcelControlAsType

Inheritance

object ← ExcelControlAsType

Inherited Members

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

Properties

Button

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

public ExcelControlButton Button { get; }

Property Value

ExcelControlButton

CheckBox

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

public ExcelControlCheckBox CheckBox { get; }

Property Value

ExcelControlCheckBox

Returns the drawing as a drop-down. If this drawing is not a drop-down, null will be returned

public ExcelControlDropDown DropDown { get; }

Property Value

ExcelControlDropDown

GroupBox

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

public ExcelControlGroupBox GroupBox { get; }

Property Value

ExcelControlGroupBox

Label

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

public ExcelControlLabel Label { get; }

Property Value

ExcelControlLabel

ListBox

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

public ExcelControlListBox ListBox { get; }

Property Value

ExcelControlListBox

RadioButton

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

public ExcelControlRadioButton RadioButton { get; }

Property Value

ExcelControlRadioButton

ScrollBar

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

public ExcelControlScrollBar ScrollBar { get; }

Property Value

ExcelControlScrollBar

SpinButton

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

public ExcelControlSpinButton SpinButton { get; }

Property Value

ExcelControlSpinButton

Methods

Type<T>()

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

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

Returns

T

The drawing as type T

Type Parameters

T

The type of drawing. T must be inherited from ExcelDrawing