SpreadsheetControl.SelectedShape Property
Gets or sets a shape selected in the active worksheet.
Namespace: DevExpress.XtraSpreadsheet
Assembly: DevExpress.XtraSpreadsheet.v24.1.dll
NuGet Package: DevExpress.Win.Spreadsheet
Declaration
Property Value
Type | Description |
---|---|
Shape | A Shape object. If you assign a shape located in a worksheet that is not active, 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 active worksheet. Images embedded in a worksheet expose the Picture interface which descends from the Shape. So, to specify a picture selected in the active worksheet, you can use the SpreadsheetControl.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 active worksheet, use the SpreadsheetControl.GetSelectedShapes or SpreadsheetControl.SetSelectedShapes method.
To select shapes in a specific worksheet of the document loaded in the SpreadsheetControl, use the Worksheet.SelectedPicture, Worksheet.SelectedShape, Worksheet.SetSelectedShapes and Worksheet.GetSelectedShapes members of the corresponding worksheet object.