[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  Prerequisites
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Collapse]Spreadsheet
   [Expand]Product Information
    Product Structure
    Getting Started
   [Expand]Spreadsheet Document
    Supported Formats
   [Expand]Cell Basics
   [Expand]Formulas
    Defined Names
    Data Binding
    Data Validation
   [Expand]Data Presentation
    Data Grouping
   [Expand]Pivot Tables
   [Collapse]Charts and Graphics
     Charting Overview
     Create and Modify a Chart Programmatically
     Shapes
     Pictures
    Printing
    Events
   [Expand]Mail Merge
    Protection
    Operation Restrictions
    Find and Replace
   [Expand]Visual Elements
    Services
   [Expand]Keyboard Shortcuts
   [Expand]Examples
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Pictures

The SpreadsheetControl allows you to insert pictures into a worksheet. A Picture interface represents an individual picture embedded in a worksheet. All images are stored in PictureCollection, accessible using the Worksheet.Pictures property. Use the PictureCollection.AddPicture method to insert a picture into a worksheet.

You can obtain a picture from the collection by its index or using the PictureCollection.GetPictureById or PictureCollection.GetPicturesByName method.

The Picture and base Shape and FloatingObject interfaces' methods and properties allow you to manipulate pictures in a document.

Member Description
Picture.Image Returns the image that the current Picture object contains.
Picture.ImageFormat Returns the format of the image residing in the Picture object.
Picture.OriginalHeight Returns the height of the image residing in the Picture object.
Picture.OriginalWidth Returns the width of the image residing in the Picture object.
Shape.Name Specifies a picture's name.
Shape.Id Specifies a picture's unique identifier.
ShapeFormatBase.Outline Allows you to format a picture's outline.
Shape.AlternativeText Specifies the descriptive (alternative) text for a picture.
Shape.InsertHyperlink Adds a hyperlink to a picture.
FloatingObject.Height Specifies a picture's height.
FloatingObject.Width Specifies a picture's width.
FloatingObject.LockAspectRatio Specifies whether a picture should keep its original proportions after resizing.
FloatingObject.Placement Specifies how a picture should behave when the underlying cells are resized or moved.
FloatingObject.Top Defines the distance between a worksheet's top edge and the top left corner of a picture.
FloatingObject.Left Defines the distance between a worksheet's left edge and the top left corner of a picture.
FloatingObject.TopLeftCell Specifies a cell where a picture's top left corner is located.
FloatingObject.BottomRightCell Specifies a cell where a picture's bottom right corner is located.
FloatingObject.Move Moves a picture by the specified offset.
Shape.Delete Allows you to remove a picture from the document.

Refer to the following topics for more examples on how to add a picture to a worksheet, and adjust its size and location.

Expanded Supported Image Formats

The SpreadsheetControl supports the following types of images.

  • Bitmap (*.bmp, *.dib)
  • JPEG File Interchange Format (*.jpg, *.jpeg)
  • Portable Network Graphics (*.png)
  • Graphics Interchange Format (*.gif)
  • Tagged Image File Format (*.tif, *.tiff)
  • Microsoft Enhanced Metafile (*.emf)
  • Windows Metafile (*.wmf)

Expanded Work with Pictures in UI

To allow end-users to insert pictures into a worksheet, add the Illustrations ribbon group to the SpreadsheetControl. For an example on how to provide a ribbon UI for the SpreadsheetControl, see the Getting Started topic.

End-users can move, resize, rotate, copy and delete embedded pictures.

Expanded Keyboard Shortcuts

The SpreadsheetControl also supports the following shortcut keys and key combinations that enable end-users to quickly perform operations with pictures.

Shortcut

Description

DELETE

Deletes the selected picture.

BACKSPACE

Deletes the selected picture.

ARROW KEYS

Move the selected picture in a worksheet.

ALT+LEFT ARROW KEY

Rotates the selected picture counterclockwise by 15 degrees.

CTRL+ALT+LEFT ARROW KEY

Rotates the selected picture counterclockwise by 1 degree.

ALT+RIGHT ARROW KEY

Rotates the selected picture clockwise by 15 degrees.

CTRL+ALT+RIGHT ARROW KEY

Rotates the selected picture clockwise by 1 degree.

SHIFT+RIGHT ARROW KEY

Increases the width of the selected picture by 10%.

If FloatingObject.LockAspectRatio is true, the height is also increased to keep the picture’s proportions.

SHIFT+UP ARROW KEY

Increases the height of the selected picture by 10%.

If FloatingObject.LockAspectRatio is true, the width is also increased to keep the picture’s proportions.

CTRL+SHIFT+RIGHT ARROW KEY

Increases the width of the selected picture by 1%.

If FloatingObject.LockAspectRatio is true, the height is also increased to keep the picture’s proportions.

CTRL+SHIFT+UP ARROW KEY

Increases the height of the selected picture by 1%.

If FloatingObject.LockAspectRatio is true, the width is also increased to keep the picture’s proportions.

SHIFT+LEFT ARROW KEY

Decreases the width of the selected picture by 10%.

If FloatingObject.LockAspectRatio is true, the height is also decreased to keep the picture’s proportions.

SHIFT+DOWN ARROW KEY

Decreases the height of the selected picture by 10%.

If FloatingObject.LockAspectRatio is true, the width is also decreased to keep the picture’s proportions.

CTRL+SHIFT+LEFT ARROW KEY

Decreases the width of the selected picture by 1%.

If FloatingObject.LockAspectRatio is true, the height is also decreased to keep the picture’s proportions.

CTRL+SHIFT+DOWN ARROW KEY

Decreases the height of the selected picture by 1%.

If FloatingObject.LockAspectRatio is true, the width is also decreased to keep the picture’s proportions.

CTRL+A

Selects all pictures in a worksheet.

TAB

Selects the next picture in a worksheet.

TAB+SHIFT

Selects the previous picture in a worksheet.

Expanded See Also

Is this topic helpful?​​​​​​​