Excel for WPF/Silverlight
XLPictureShape コンストラクタ(WriteableBitmap,Int32,Int32,Int32,Int32)
使用例 

C1.WPF.Excel.4.5.2 アセンブリ > C1.WPF.Excel 名前空間 > XLPictureShape クラス > XLPictureShape コンストラクタ : XLPictureShape コンストラクタ(WriteableBitmap,Int32,Int32,Int32,Int32)
新しい XLPictureShapeに格納されている画像。
セルに対する画像の水平位置(twips 単位)。
セルに対する画像の垂直位置(twips 単位)。
画像の幅(twips 単位)。
画像の高さ(twips 単位)。
XLPictureShapeの新しいインスタンスを初期化します。
シンタックス
'宣言
 
Public Function New( _
   ByVal img As System.Windows.Media.Imaging.WriteableBitmap, _
   ByVal x As System.Integer, _
   ByVal y As System.Integer, _
   ByVal width As System.Integer, _
   ByVal height As System.Integer _
)
public XLPictureShape( 
   System.Windows.Media.Imaging.WriteableBitmap img,
   System.int x,
   System.int y,
   System.int width,
   System.int height
)

パラメータ

img
新しい XLPictureShapeに格納されている画像。
x
セルに対する画像の水平位置(twips 単位)。
y
セルに対する画像の垂直位置(twips 単位)。
width
画像の幅(twips 単位)。
height
画像の高さ(twips 単位)。
使用例
下のコードはセルに画像を追加します。画像は、セルの中央にある 60 twips 幅のエッジで囲まれた四角形内に描画されます。
// シートとセルを取得します
XLSheet sheet = c1ExcelBook1.Sheets[0];
XLCell cell = sheet[row, col];
          
// ピクチャの大きさを調整するためにセルサイズを計算します
Rectangle rc = new Rectangle(0, 0 sheet.Columns[col].Width, sheet.Rows[row].Height);
          
// 60 twips のエッジを追加します
rc.Inflate(-60, -60);
          
// XLPictureShape を作成します
XLPictureShape pic = new XLPictureShape(image, rc.X, rc.Y, rc.Width, rc.Height);
          
// XLPictureShape をセルに割り当てます
cell.Value = pic;
参照

XLPictureShape クラス
XLPictureShape メンバ
オーバーロード一覧