Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

IUriStreamService Interface

Defines a service which is called to retrieve data from the URI specified in some types of document fields.

Namespace: DevExpress.Office.Services

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

NuGet Package: DevExpress.Office.Core

#Declaration

[ComVisible(true)]
public interface IUriStreamService

#Remarks

When a field is updated, the IUriStreamService.GetStream method is called. This method calls the IUriStreamProvider.GetStream methods of registered providers to obtain a stream of image data. Subsequent calls are made until a successful result is obtained. The order of calls is the order in which providers have been registered. By default, there is only one provider - the WebUriStreamProvider that enables you to load an image from the specified URI by performing a web request.

#Example

This example demonstrates how to use the IUriStreamService.RegisterProvider method to register a custom data stream provider implementing the IUriStreamProvider interface and make it available to clients of the IUriStreamService service.

View Example

private void RegisterUriStreamService(RichEditControl richEditControl) {
    IUriStreamService uriStreamService = richEditControl.GetService<IUriStreamService>();
    uriStreamService.RegisterProvider(new ImageStreamProvider(NorthwindDataProvider.Categories, "Picture"));
}
See Also