officefileapi-devexpress-dot-spreadsheet-dot-spreadsheetimagesource-dot-fromuri-x28-system-dot-string-system-dot-componentmodel-dot-design-dot-iservicecontainer-x29.md
Downloading images passed as URLs to the FromUri method may create security issues. Review the following help topic and learn how to spot, analyze, and prohibit unwanted download requests:
Suppress Control Requests to Download Data from External URLs
Creates an image source object from the specified URI string.
Namespace : DevExpress.Spreadsheet
Assembly : DevExpress.Spreadsheet.v25.2.Core.dll
NuGet Package : DevExpress.Spreadsheet.Core
[ComVisible(false)]
public static SpreadsheetImageSource FromUri(
string uri,
IServiceContainer serviceContainer
)
<ComVisible(False)>
Public Shared Function FromUri(
uri As String,
serviceContainer As IServiceContainer
) As SpreadsheetImageSource
| Name | Type | Description |
|---|---|---|
| uri | String |
A string of characters identifying the resource in the Internet that can be interpreted as an image.
| | serviceContainer | IServiceContainer |
An object providing the IUriStreamService interface which allows you to obtain a data stream for a specified URI.
|
| Type | Description |
|---|---|
| SpreadsheetImageSource |
A SpreadsheetImageSource object representing the image in the spreadsheet.
|
Use a Workbook instance as the service container to get images for the specified URI. You can also implement your own service provider, if required. See the IUriStreamProvider topic for more information.
The following code snippets (auto-collected from DevExpress Examples) contain references to the FromUri(String, IServiceContainer) method.
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.
// Create an image from Uri.
SpreadsheetImageSource imageSource = SpreadsheetImageSource.FromUri(imageUri, workbook);
// Set the measurement unit to point.
// Create an image from Uri.
SpreadsheetImageSource imageSource = SpreadsheetImageSource.FromUri(imageUri, workbook);
// Set the measurement unit to point.
' Create an image from Uri.
Dim imageSource As SpreadsheetImageSource = SpreadsheetImageSource.FromUri(imageUri, workbook)
' Set the measurement unit to point.
' Create an image from Uri.
Dim imageSource As SpreadsheetImageSource = SpreadsheetImageSource.FromUri(imageUri, workbook)
' Set the measurement unit to point.
See Also