Back to Devexpress

Shape.Delete() Method

officefileapi-devexpress-dot-spreadsheet-dot-shape-ed73e76c.md

latest4.0 KB
Original Source

Shape.Delete() Method

Deletes a drawing object.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
void Delete()
vb
Sub Delete

Remarks

The Delete method removes the current Shape from the collection of Worksheet.Shapes in the current worksheet.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Delete() method.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_API_Part02/SpreadsheetActions/PictureActions.cs#L48

csharp
Picture pic = worksheet.Pictures.GetPicturesByName("Picture 4")[0];
    pic.Delete();
}

wpf-spreadsheetcontrol-api-part-2/CS/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/ShapeActions.cs#L42

csharp
Shape picShape = worksheet.Shapes.GetShapesByName("Picture 4")[0];
    picShape.Delete();
}

spreadsheet-document-api-examples-part2/CS/SpreadsheetDocServerAPIPart2/CodeExamples/PictureActions.cs#L33

csharp
// Remove the last inserted picture.
    picShape.Delete();
}

winforms-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_API_Part02/SpreadsheetActions/PictureActions.vb#L49

vb
Dim pic As Picture = worksheet.Pictures.GetPicturesByName("Picture 4")(0)
    pic.Delete()
Finally

wpf-spreadsheetcontrol-api-part-2/VB/SpreadsheetControl_WPF_API_Part02/SpreadsheetActions/ShapeActions.vb#L43

vb
Dim picShape As Shape = worksheet.Shapes.GetShapesByName("Picture 4")(0)
    picShape.Delete()
Finally

spreadsheet-document-api-examples-part2/VB/SpreadsheetDocServerAPIPart2/CodeExamples/PictureActions.vb#L29

vb
' Remove the last inserted picture.
    picShape.Delete()
Finally

See Also

Shapes

Shape Interface

Shape Members

DevExpress.Spreadsheet Namespace