officefileapi-devexpress-dot-office-dot-utils-dot-officeimage-50d26391.md
This property is overridden in OfficeImage class descendants to get the URI of the image.
Namespace : DevExpress.Office.Utils
Assembly : DevExpress.Office.v25.2.Core.dll
NuGet Package : DevExpress.Office.Core
public virtual string Uri { get; set; }
Public Overridable Property Uri As String
| Type | Description |
|---|---|
| String |
A string specifying the URI of an image.
|
The following code snippets (auto-collected from DevExpress Examples) contain references to the Uri 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.
how-to-customize-copy-and-paste-commands/CS/RichEditCustomCopyPaste/HtmlRelatedClasses.cs#L61
public string CreateImageUri(string rootUri, OfficeImage image, string relativeUri) {
if (string.IsNullOrEmpty(image.Uri))
return new DataStringUriProvider().CreateImageUri(rootUri, image, relativeUri);
word-processing-create-a-custom-format-exporter/CS/BBCExporter.cs#L126
protected override void ExportInlinePictureRun(InlinePictureRun run) {
DocumentContentWriter.Write(string.Format("[img]{0}[/img]", run.Image.Uri));
base.ExportInlinePictureRun(run);
winforms-rich-text-editor-retain-original-image-uri-in-html-document/CS/CustomUriProvider.cs#L13
public string CreateImageUri(string rootUri, OfficeImage image, string relativeUri) {
return image.Uri;
}
how-to-customize-copy-and-paste-commands/VB/HtmlRelatedClasses.vb#L63
Public Function CreateImageUri(ByVal rootUri As String, ByVal image As OfficeImage, ByVal relativeUri As String) As String Implements IUriProvider.CreateImageUri
If String.IsNullOrEmpty(image.Uri) Then
Return (New DataStringUriProvider()).CreateImageUri(rootUri, image, relativeUri)
word-processing-create-a-custom-format-exporter/VB/BBCExporter.vb#L169
Protected Overrides Sub ExportInlinePictureRun(ByVal run As InlinePictureRun)
DocumentContentWriter.Write(String.Format("[img]{0}[/img]", run.Image.Uri))
MyBase.ExportInlinePictureRun(run)
winforms-rich-text-editor-retain-original-image-uri-in-html-document/VB/CustomUriProvider.vb#L14
Public Function CreateImageUri(ByVal rootUri As String, ByVal image As OfficeImage, ByVal relativeUri As String) As String Implements IUriProvider.CreateImageUri
Return image.Uri
End Function
See Also