Back to Devexpress

Workbook.ShapeRemoving Event

officefileapi-devexpress-dot-spreadsheet-dot-workbook-c24d3caf.md

latest3.0 KB
Original Source

Workbook.ShapeRemoving Event

Occurs before a drawing object is removed from 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 ShapeChangingEventHandler ShapeRemoving
vb
Public Event ShapeRemoving As ShapeChangingEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
ShapeIdGets the ID value of the drawing object being removed.
ShapeTypeGets the type of the drawing object being removed.

Remarks

The ShapeRemoving event allows you to perform any actions before a drawing object is removed from the worksheet. To obtain the type of the drawing object for which the event has been raised, use the event parameter’s ShapeType property. You can prevent a drawing object from being removed by setting the Cancel property to true.

After a drawing object has been removed, the Workbook.ShapeRemoved event is raised.

Note

By default, the ShapeRemoving event does not occur. To trigger it, set the WorkbookEventOptions.RaiseOnModificationsViaAPI property (accessible via the Workbook.Options.Events.RaiseOnModificationsViaAPI notation) to true.

Implements

ShapeRemoving

See Also

ShapeRemoved

Workbook Class

Workbook Members

DevExpress.Spreadsheet Namespace