How to: Add a Hyperlink to a Picture
This example demonstrates how to associate a hyperlink with a picture using the following API.
Member | Description |
---|---|
Picture |
Inserts a picture from a file or a Spreadsheet |
Shape. |
Creates a new Shape |
Hyperlink |
Specifies the hyperlink’s tooltip. |
The code sample below inserts a picture and attaches a hyperlink to it.
Workbook workbook = new Workbook();
Picture picture = workbook.Worksheets[0].Pictures.AddPicture("DevExpress.png", workbook.Worksheets[0].Cells["A1"]);
ShapeHyperlink shapeHyperlink = picture.InsertHyperlink("https://community.devexpress.com/blogs/", true);
shapeHyperlink.TooltipText = "Check the recent DevExpress blogs";