Spread Silverlight Documentation
AddPicture(String,ImageSource,Int32,Double,Int32,Double,Int32,Double,Int32,Double) Method
Example 


The name.
The source.
The row.
The row offset.
The column.
The column offset.
The end row.
The end row offset.
The end column.
The end column offset.
Adds the picture.
Syntax
'Declaration
 
Public Overloads Function AddPicture( _
   ByVal name As System.String, _
   ByVal source As System.Windows.Media.ImageSource, _
   ByVal row As System.Integer, _
   ByVal rowOffset As System.Double, _
   ByVal column As System.Integer, _
   ByVal columnOffset As System.Double, _
   ByVal endRow As System.Integer, _
   ByVal endRowOffset As System.Double, _
   ByVal endColumn As System.Integer, _
   ByVal endColumnOffset As System.Double _
) As Picture
'Usage
 
Dim instance As Worksheet
Dim name As System.String
Dim source As System.Windows.Media.ImageSource
Dim row As System.Integer
Dim rowOffset As System.Double
Dim column As System.Integer
Dim columnOffset As System.Double
Dim endRow As System.Integer
Dim endRowOffset As System.Double
Dim endColumn As System.Integer
Dim endColumnOffset As System.Double
Dim value As Picture
 
value = instance.AddPicture(name, source, row, rowOffset, column, columnOffset, endRow, endRowOffset, endColumn, endColumnOffset)
public Picture AddPicture( 
   System.string name,
   System.Windows.Media.ImageSource source,
   System.int row,
   System.double rowOffset,
   System.int column,
   System.double columnOffset,
   System.int endRow,
   System.double endRowOffset,
   System.int endColumn,
   System.double endColumnOffset
)

Parameters

name
The name.
source
The source.
row
The row.
rowOffset
The row offset.
column
The column.
columnOffset
The column offset.
endRow
The end row.
endRowOffset
The end row offset.
endColumn
The end column.
endColumnOffset
The end column offset.
Example
This example sets the AddPicture method.
Uri uri = new Uri("C:\\artwork\\chartarea.png", UriKind.Absolute);
BitmapImage img = new BitmapImage(uri);
gcSpreadSheet1.Sheets[0].AddPicture("picture", img);
//gcSpreadSheet1.Sheets[0].AddPicture("picture", img, 0, 0, 300, 200);
//gcSpreadSheet1.Sheets[0].AddPicture("picture", img, 0, 1, 1, 2, 200, 200);
//gcSpreadSheet1.Sheets[0].AddPicture("picture", img, 0, 5, 1, 5, 6, 10, 5, 10);
Dim uri As New Uri("C:\SpreadWPF2\artwork\chartarea.png", UriKind.Absolute)
Dim img As New BitmapImage(uri)
GcSpreadSheet1.Sheets(0).AddPicture("picture", img)
'gcSpreadSheet1.Sheets(0).AddPicture("picture", img, 0, 0, 300, 200)
'gcSpreadSheet1.Sheets(0).AddPicture("picture", img, 0, 1, 1, 2, 200, 200)
'gcSpreadSheet1.Sheets(0).AddPicture("picture", img, 0, 5, 1, 5, 6, 10, 5, 10)
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

Worksheet Class
Worksheet Members
Overload List

 

 


Copyright © GrapeCity, inc. All rights reserved.