SPREAD for WPF 3.0J - GcSpreadGrid
Stretch プロパティ (ImageCellType)
使用例 

GrapeCity.Windows.SpreadGrid 名前空間 > ImageCellType クラス : Stretch プロパティ
描画先の四角形を埋めるために画像をどのように引き伸ばすかを表す値を取得または設定します。
シンタックス
'宣言
 
Public Property Stretch As Stretch
public Stretch Stretch {get; set;}

プロパティ値

System.Windows.Media.Stretch 値の1つ。既定値は System.Windows.Media.Stretch.Uniform です。
使用例
次のサンプルはImageCellTypeを作成しイメージ・リンクをイメージに変えるためにImageConverterをセットします。
public void CreateImageCell1()
{
ImageCellType imageCellType1 = new ImageCellType();
imageCellType1.Stretch = System.Windows.Media.Stretch.UniformToFill;

//If the Cell.Value is 'http://www.gcpowertools.com.cn/products/img/mr/ImageCell.jpg', 
//which is an address linked to a image, you can use the following MyImageConverter to represent that image.
imageCellType1.ImageConverter = new MyImageConverter();

this._gcSpreadGrid1[0, 0].CellType = imageCellType1;
}
class MyImageConverter : IImageSourceConverter
{
public System.Windows.Media.ImageSource GetImageSource(object value)
{
if (value != null)
{
var image = new System.Windows.Media.Imaging.BitmapImage(new Uri(value.ToString(), UriKind.Absolute));
return image;
}
return null;
}
}
Public Sub CreateImageCell1()
Dim imageCellType1 As New ImageCellType()
imageCellType1.Stretch = System.Windows.Media.Stretch.UniformToFill

'If the Cell.Value is 'http://www.gcpowertools.com.cn/products/img/mr/ImageCell.jpg', 
'which is an address linked to a image, you can use the following MyImageConverter to represent that image.
imageCellType1.ImageConverter = New MyImageConverter()

Me._gcSpreadGrid1(0, 0).CellType = imageCellType1
End Sub
Private Class MyImageConverter
Implements IImageSourceConverter
Public Function GetImageSource(value As Object) As System.Windows.Media.ImageSource Implements IImageSourceConverter.GetImageSource
If value IsNot Nothing Then
Dim image = New System.Windows.Media.Imaging.BitmapImage(New Uri(value.ToString(), UriKind.Absolute))
Return image
End If
Return Nothing
End Function
End Class
参照

ImageCellType クラス
ImageCellType メンバ