The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
The page you are viewing does not exist in the .NET Standard 2.0+ platform documentation. This link will take you to the parent topic of the current section.

SubDocument.GetImages(DocumentRange) Method

Obsolete. Gets all images (inline pictures and shapes) in the specified document range. Use a method accessible with the RichEditControl.Document.Images.Get(DocumentRange range) notation instead.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

[Obsolete("This method has become obsolete. Use the 'DevExpress.XtraRichEdit.API.Native.ReadOnlyDocumentImageCollection.Get(DocumentRange range)' method instead.")]
DocumentImageCollection GetImages(
    DocumentRange range
)
<Obsolete("This method has become obsolete. Use the 'DevExpress.XtraRichEdit.API.Native.ReadOnlyDocumentImageCollection.Get(DocumentRange range)' method instead.")>
Function GetImages(
    range As DocumentRange
) As DocumentImageCollection

Parameters

Name Type Description
range DocumentRange

A DocumentRange specifying the range in which to search for images.

Returns

Type Description
DocumentImageCollection

A DocumentImageCollection object which holds the located images.

Remarks

Important

This method is obsolete. Use the ReadOnlyDocumentImageCollection.Get method instead.

If you operate with a selection range, the GetImages method should be enclosed within a DocumentRange.BeginUpdateDocument - DocumentRange.EndUpdateDocument method pair. Otherwise, an incorrect document model might be selected, resulting in an exception "Error: specified document position or range belongs to other document or subdocument" being thrown.

The following example examines all images in the document. If the width of an image exceeds 50 millimeters, the image is scaled proportionally to half its size.

document.LoadDocument("Grimm.docx", DevExpress.XtraRichEdit.DocumentFormat.OpenXml)
Dim images As ReadOnlyDocumentImageCollection = document.Images
' If the width of an image exceeds 50 millimeters, 
' the image is scaled proportionally to half its size.
For i As Integer = 0 To images.Count - 1
    If images(i).Size.Width > DevExpress.Office.Utils.Units.MillimetersToDocumentsF(50) Then
        images(i).ScaleX /= 2
        images(i).ScaleY /= 2
    End If
Next i
See Also