Back to Devexpress

Workbook.ShapeInserted Event

officefileapi-devexpress-dot-spreadsheet-dot-workbook-1c4439ba.md

latest2.9 KB
Original Source

Workbook.ShapeInserted Event

Occurs after a drawing object has been inserted into a worksheet.

You need a license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this event in production code.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Docs.v25.2.dll

NuGet Package : DevExpress.Document.Processor

Declaration

csharp
public event ShapeChangedEventHandler ShapeInserted
vb
Public Event ShapeInserted As ShapeChangedEventHandler

Event Data

The ShapeInserted event's data class is ShapeChangedEventArgs. The following properties provide information specific to this event:

PropertyDescription
ShapeIdGets the ID value of the drawing object that has been inserted or removed.
ShapeNameGets the name of the drawing object that has been inserted or removed.
ShapeTypeGets the type of the drawing object that has been inserted or removed.

Remarks

Handle the ShapeInserted event to perform specific actions each time a drawing object is inserted into a worksheet. To obtain the type of the inserted drawing object, use the ShapeType parameter.

After a drawing object has been deleted from a worksheet, the Workbook.ShapeRemoved event is raised.

Note

By default, the ShapeInserted event does not occur when inserting a new drawing object in code. However, this event will also be triggered by changes made via an API if you set the WorkbookEventOptions.RaiseOnModificationsViaAPI property (accessible via the Workbook.Options.Events.RaiseOnModificationsViaAPI notation) to true.

Implements

ShapeInserted

See Also

ShapeRemoved

Workbook Class

Workbook Members

DevExpress.Spreadsheet Namespace