Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SpreadsheetControl.GetSelectedShapes() Method

Returns shapes currently selected in the worksheet.

Namespace: DevExpress.Xpf.Spreadsheet

Assembly: DevExpress.Xpf.Spreadsheet.v24.2.dll

NuGet Package: DevExpress.Wpf.Spreadsheet

#Declaration

public IList<Shape> GetSelectedShapes()

#Returns

Type Description
IList<Shape>

A list of the Shape objects.

#Remarks

All shapes in a worksheet are contained in the ShapeCollection, accessible using the Worksheet.Shapes property. Use the GetSelectedShapes method to get the list of shapes selected in the active worksheet. To select multiple shapes in the active worksheet, use the SpreadsheetControl.SetSelectedShapes method. To specify whether multi-selection is available to end-users in the SpreadsheetControl, use the SpreadsheetSelectionBehaviorOptions.AllowMultiSelection option accessible using the SpreadsheetControl.Options.Behavior.Selection.AllowMultiSelection notation.

To specify a single shape (for example, a picture) selected in the active worksheet, use the SpreadsheetControl.SelectedShape or SpreadsheetControl.SelectedPicture property.

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.

See Also