Back to Devexpress

DocumentImage.Size Property

officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-documentimage-f4e870de.md

latest5.1 KB
Original Source

DocumentImage.Size Property

Specifies the size of the inline image.

Namespace : DevExpress.XtraRichEdit.API.Native

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

NuGet Package : DevExpress.RichEdit.Core

Declaration

csharp
SizeF Size { get; set; }
vb
Property Size As SizeF

Property Value

TypeDescription
SizeF

A SizeF object representing the image size in in current measure units.

|

Remarks

The original size of an image is available via the DocumentImage.OriginalSize property. You can use the DocumentImage.ScaleX and DocumentImage.ScaleY properties or execute the ChangeInlinePictureScaleCommand command, to independently change the dimensions of the inline image in the document.

The following code snippets (auto-collected from DevExpress Examples) contain references to the Size 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/Shapes.cs#L90

csharp
// Resize the image so that its size equals the image in the main document.
boxedDocument.Images[0].Size = document.Images[0].Size;
#endregion #InsertRichTextInTextBox

wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/ShapesActions.cs#L97

csharp
// Resize the image so that its size equals the image in the main document.
boxedDocument.Images[0].Size = document.Images[0].Size;
#endregion #InsertRichTextInTextBox

word-document-api-examples/CS/CodeExamples/ShapesActions.cs#L155

csharp
// Resize the image so that its size equals the image in the main document.
boxedDocument.Images[0].Size = document.Images[0].Size;
#endregion #InsertRichTextInTextBox

winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Shapes.vb#L80

vb
' Resize the image so that its size equals the image in the main document.
            boxedDocument.Images(CInt((0))).Size = document.Images(CInt((0))).Size
#End Region ' #InsertRichTextInTextBox

wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/ShapesActions.vb#L87

vb
' Resize the image so that its size equals the image in the main document.
            boxedDocument.Images(0).Size = document.Images(0).Size
' #End Region ' #InsertRichTextInTextBox

word-document-api-examples/VB/CodeExamples/ShapesActions.vb#L131

vb
' Resize the image so that its size equals the image in the main document.
            boxedDocument.Images(0).Size = document.Images(0).Size
#End Region ' #InsertRichTextInTextBox

See Also

ChangeInlinePictureScaleCommand

DocumentImage Interface

DocumentImage Members

DevExpress.XtraRichEdit.API.Native Namespace