Back to Devexpress

OfficeImage.NativeImage Property

officefileapi-devexpress-dot-office-dot-utils-dot-officeimage-a5b1e0a0.md

latest5.5 KB
Original Source

OfficeImage.NativeImage Property

Provides access to the native Image object.

Namespace : DevExpress.Office.Utils

Assembly : DevExpress.Office.v25.2.Core.dll

NuGet Package : DevExpress.Office.Core

Declaration

csharp
public abstract Image NativeImage { get; }
vb
Public MustOverride ReadOnly Property NativeImage As Image

Property Value

TypeDescription
Image

A Image object specifying a native image.

|

Remarks

Use the DXImage property instead of NativeImage to retrieve a native image on non-Windows environments.

The following code snippets (auto-collected from DevExpress Examples) contain references to the NativeImage property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Export.cs#L21

csharp
DevExpress.Office.Utils.OfficeImage myImage = docImageColl[0].Image;
System.Drawing.Image image = myImage.NativeImage;
string imageName = String.Format("Image_at_pos_{0}.png", docRange.Start.ToInt());

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/ExportActions.cs#L22

csharp
DevExpress.Office.Utils.OfficeImage myImage = docImageColl[0].Image;
System.Drawing.Image image = myImage.NativeImage;
string imageName = String.Format("Image_at_pos_{0}.png", docRange.Start.ToInt());

word-document-api-examples/CS/CodeExamples/InlinePictureActions.cs#L60

csharp
DevExpress.Office.Utils.OfficeImage myImage = images[0].Image;
System.Drawing.Image image = myImage.NativeImage;
string imageName = String.Format("Image_at_pos_{0}.png", images[0].Range.Start.ToInt());

office-file-api-create-thumbnail-images-for-docx-xlsx-pdf-files/CS/ImageExporterHelper.cs#L25

csharp
OfficeImage docImage = worksheet.CreateThumbnail(1600, 900);
    return docImage.NativeImage;
}

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Export.vb#L18

vb
Dim myImage As DevExpress.Office.Utils.OfficeImage = docImageColl(CInt((0))).Image
Dim image As System.Drawing.Image = myImage.NativeImage
Dim imageName As String = System.[String].Format("Image_at_pos_{0}.png", docRange.Start.ToInt())

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/ExportActions.vb#L18

vb
Dim myImage As DevExpress.Office.Utils.OfficeImage = docImageColl(0).Image
Dim image As System.Drawing.Image = myImage.NativeImage
Dim imageName As String = String.Format("Image_at_pos_{0}.png", docRange.Start.ToInt())

word-document-api-examples/VB/CodeExamples/InlinePictureActions.vb#L49

vb
Dim myImage As DevExpress.Office.Utils.OfficeImage = images(CInt((0))).Image
Dim image As System.Drawing.Image = myImage.NativeImage
Dim imageName As String = System.[String].Format("Image_at_pos_{0}.png", images(CInt((0))).Range.Start.ToInt())

office-file-api-create-thumbnail-images-for-docx-xlsx-pdf-files/VB/ImageExporterHelper.vb#L17

vb
Dim docImage As OfficeImage = worksheet.CreateThumbnail(1600, 900)
    Return docImage.NativeImage
End Using

See Also

OfficeImage Class

OfficeImage Members

DevExpress.Office.Utils Namespace