GrapeCity.Windows.SpreadSheet.Data Namespace > Worksheet Class > AddPicture Method : AddPicture(String,ImageSource) Method |
'Declaration Public Overloads Function AddPicture( _ ByVal name As System.String, _ ByVal source As System.Windows.Media.ImageSource _ ) As Picture
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)
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