←Select platform

BackImageUrl Property


Optional URL to the background of this item.

public Uri BackImageUrl { get; set; } 
   property System::Uri^ BackImageUrl 
      System::Uri^ get() 
      void set(System::Uri^ value) 

Property Value

The URL to the optional background image of this item. Default value is null.


The action taken when setting this value depends on whether the item is already a member of a viewer (it has been added to Items). If the item is not part of a viewer, then the value of BackImageUrl will be set with the new value and the actions described below will not occur till the item is added to a viewer.

When setting the value of this property (or adding an item to the viewer's Items), the viewer will do the following:

If the new value is null, then any previous image data is deleted. This is done by setting the value of BackImage to null.

If the new value is not null, then the following happens:

  1. The RasterCodecs object stored in RasterCodecsInstance is used to load the URL with RasterCodecs.LoadSvgAsync. The load is performed asynchronously and control is returned back to the user right away. The value of BackImageUrl is not changed and will still hold the old value.

  2. When the loading finishes (LoadAsyncCompleted occurs), The BackImageUrl property will be updated with the original value passed. Previous data in BackImage will be deleted and replaced with the image object. When this is done, ItemChanged will occur with information on the item and Reason set to ImageViewerItemChangedReason.BackImageUrl. If an error occurs during load, ItemError will fire with information about the error. BackImageUrl and BackImage will not be updated and will still hold the original data.

In essence, setting the value of BackImageUrl to null will clear the background image data right away.

Setting the value of BackImageUrl to another value will return control immediately without changing the background image in the item, when loading is finished, the values are updated (including BackImageUrl itself) and ItemChanged will occur.

If an error occur, the item is not changed and ItemError will occur.

BackImageUrl property of ImageViewer will update this member if this is the active item when the viewer is used in single item mode.

For more information, refer to Image Viewer Items.


Target Platforms

Help Version 22.0.2023.1.24
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.