SpreadsheetControl.SelectedPicture Property

Gets or sets a picture selected in the active worksheet.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v21.1.dll


public Picture SelectedPicture { get; set; }

Property Value

Type Description

A Picture object. If you assign a picture located in a worksheet that is not active, an exception is raised.


An image in a worksheet is a Picture object, which is a descendant of the Shape interface. All images in a worksheet are contained in the ShapeCollection, accessible via the Worksheet.Shapes property. To specify a picture selected in the active worksheet, use the SelectedPicture or SpreadsheetControl.SelectedShape property.

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.

See Also