Spread does not support setting the image as a value like that. It does support adding a drawing object like this:
using System;
using System.Windows;
using System.Windows.Controls;
using GrapeCity.Windows.SpreadSheet.UI;
using GrapeCity.Windows.SpreadSheet.Data;
namespace SilverlightApplication37
{
public partial class MainPage : UserControl
{
public MainPage()
{
InitializeComponent();
this.gcSpreadSheet1.Sheets.Clear();
this.gcSpreadSheet1.Sheets.Add(new MyWorksheet());
var sheet = this.gcSpreadSheet1.ActiveSheet;
}
}
public class ControlDrawingObject : CustomDrawingObject
{
private Control _rootElement;
public ControlDrawingObject(int row, int col, Control control) : base(row, col) { _rootElement = control; this.ShowDrawingObjectOnly = true; }
public override FrameworkElement RootElement
{
get { _rootElement.Margin = new Thickness(1); return _rootElement; }
}
}
public class MyWorksheet : Worksheet
{
public bool DrawingObjectVisible { get; set; }
public override DrawingObject[] GetDrawingObject(int row, int column, int rowCount, int columnCount)
{
if (row != 1 || column != 1) return base.GetDrawingObject(row, column, rowCount, columnCount);
DrawingObject dobj;
dobj = new ControlDrawingObject(row, column, new HyperlinkButton() { Content="This is a link", NavigateUri=new Uri("
http://www.google.com") });
return new DrawingObject[] { dobj };
}
}
}
So you should be able to replace the code for creating the ControlDrawingObject to use your image instead of the HyperlinkButton.
The next release of Spread WPF-Silverlight will have a new feature that will make this possible without the inherited MyWorksheet class (i.e. a new API for setting the drawing object).