Back to Devexpress

Worksheet.SelectedShape Property

officefileapi-devexpress-dot-spreadsheet-dot-worksheet-7b61ce35.md

latest3.1 KB
Original Source

Worksheet.SelectedShape Property

Gets or sets a shape selected in the worksheet.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
Shape SelectedShape { get; set; }
vb
Property SelectedShape As Shape

Property Value

TypeDescription
Shape

A Shape object. If you assign a shape located in a worksheet other than the current worksheet, an exception is raised.

|

Remarks

All shapes in a worksheet are contained in the ShapeCollection, accessible via the Worksheet.Shapes property. Use the SelectedShape property to specify a shape selected in the worksheet. Images embedded in a worksheet expose the Picture interface which descends from the Shape. So, to specify a picture selected in the worksheet, you can use the Worksheet.SelectedPicture property as well as SelectedShape.

You can also select multiple shapes in the worksheet simultaneously. To get or set a list of shapes selected in the worksheet, use the Worksheet.GetSelectedShapes or Worksheet.SetSelectedShapes method.

The SelectedPicture , SelectedShape , GetSelectedShapes and SetSelectedShapes members of the SpreadsheetControl or SpreadsheetControl object allow you to select shapes in the worksheet that is currently active in the control.

See Also

SelectedPicture

GetSelectedShapes()

SetSelectedShapes(IList<Shape>)

Worksheet Interface

Worksheet Members

DevExpress.Spreadsheet Namespace