URL of image data associated with this item.
public Uri Url { get; set; }
Public Property Url() As System.Uri
Get
Set
public:
property System::Uri^ Url
{
System::Uri^ get()
void set(System::Uri^ value)
}
The URL of the image associated with 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 Url 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 done by setting the value of Image and SvgDocument to null. The value of Resolution is not changed. This will create an empty item.
If the new value is not null, then the following happens:
The RasterCodecs object stored in RasterCodecsInstance is used to load the URL as follows:
If the value of LoadUrlAsSvg is false (the default), then RasterCodecs.LoadAsync is used.
If the value of LoadUrlAsSvg is true then RasterCodecs.LoadSvgAsync is used.
In either case, the load is performed asynchronously and control is returned back to the user right away. The value of Url is not changed and will still hold the old value.
in essence, setting the value of Url to null will clear the image data right away.
Setting the value of Url to another value will return control immediately without changing the item, when loading is finished, the values are updated (including Url itself) and ItemChanged will occur.
If an error occur, the item is not changed and ItemError will occur.
ImageUrl 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.
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;
string[] urls =
{
@"http://localhost/myimages/layouttest/200by100_1.png",
@"http://localhost/myimages/layouttest/200by100_2.png",
@"http://localhost/myimages/layouttest/200by100_3.png",
@"http://localhost/myimages/layouttest/100by200_1.png",
@"http://localhost/myimages/layouttest/100by200_2.png",
@"http://localhost/myimages/layouttest/100by200_3.png"
};
int itemIndex = 0;
_imageViewer.BeginTransform();
for (int urlIndex = 0; urlIndex < urls.Length; urlIndex++)
{
ImageViewerItem item = new ImageViewerItem();
item.Url = new Uri(urls[urlIndex]);
item.Text = "Item" + itemIndex;
this._imageViewer.Items.Add(item);
itemIndex++;
}
_imageViewer.EndTransform();
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
Imports LeadtoolsControlsExamples.LeadtoolsExamples.Common
Dim urls As String() = {"http://localhost/myimages/layouttest/200by100_1.png",
"http://localhost/myimages/layouttest/200by100_2.png",
"http://localhost/myimages/layouttest/200by100_3.png",
"http://localhost/myimages/layouttest/100by200_1.png",
"http://localhost/myimages/layouttest/100by200_2.png",
"http://localhost/myimages/layouttest/100by200_3.png"}
Dim itemIndex As Integer = 0
_imageViewer.BeginTransform()
Dim urlIndex As Integer = 0
Do While urlIndex < urls.Length
Dim item As ImageViewerItem = New ImageViewerItem()
item.Url = New Uri(urls(urlIndex))
item.Text = "Item" & itemIndex
Me._imageViewer.Items.Add(item)
itemIndex += 1
urlIndex += 1
Loop
_imageViewer.EndTransform()
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET