Back to Devexpress

SpreadsheetControl.SetSelectedShapes(IList<Shape>) Method

wpf-devexpress-dot-xpf-dot-spreadsheet-dot-spreadsheetcontrol-dot-setselectedshapes-x28-system-dot-collections-dot-generic-dot-ilist-devexpress-dot-spreadsheet-dot-shape-x29.md

latest3.0 KB
Original Source

SpreadsheetControl.SetSelectedShapes(IList<Shape>) Method

Select specified shapes in the active worksheet.

Namespace : DevExpress.Xpf.Spreadsheet

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

NuGet Package : DevExpress.Wpf.Spreadsheet

Declaration

csharp
public bool SetSelectedShapes(
    IList<Shape> Shapes
)
vb
Public Function SetSelectedShapes(
    Shapes As IList(Of Shape)
) As Boolean

Parameters

NameTypeDescription
ShapesIList<Shape>

A list of Shape objects.

|

Returns

TypeDescription
Boolean

true if shapes are selected successfully; otherwise false. If you pass null ( Nothing in Visual Basic), or an empty list, or a list that contains at least one shape located in a worksheet other than the active worksheet, the method returns false.

|

Remarks

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

Note

To select shapes in a specific worksheet (which may or may not be active) of the document loaded in the SpreadsheetControl, use the Worksheet.SetSelectedShapes method of the worksheet object.

See Also

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.Xpf.Spreadsheet Namespace