Spread WPF Documentation
AddPicture(String,ImageSource) Method
Example 


GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > AddPicture Method : AddPicture(String,ImageSource) Method
The name.
The image source.
Adds the picture.
Syntax
'Declaration
 
Public Overloads Function AddPicture( _
   ByVal name As System.String, _
   ByVal source As System.Windows.Media.ImageSource _
) As Picture
'Usage
 
Dim instance As Worksheet
Dim name As System.String
Dim source As System.Windows.Media.ImageSource
Dim value As Picture
 
value = instance.AddPicture(name, source)
public Picture AddPicture( 
   System.string name,
   System.Windows.Media.ImageSource source
)

Parameters

name
The name.
source
The image source.
Example
This example uses 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)
See Also

Reference

Worksheet Class
Worksheet Members
Overload List