LEADTOOLS WebForms and AJAX (Leadtools.Web assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
ImageUrl Property
See Also 
Leadtools.Web.Controls Namespace > WebImageViewer Class : ImageUrl Property



Gets or sets the URL of the image to be displayed

Syntax

Visual Basic (Declaration) 
Public Property ImageUrl As String
Visual Basic (Usage)Copy Code
Dim instance As WebImageViewer
Dim value As String
 
instance.ImageUrl = value
 
value = instance.ImageUrl
C# 
public string ImageUrl {get; set;}
C++/CLI 
public:
property String^ ImageUrl {
   String^ get();
   void set (    String^ value);
}

Property Value

A character string that contains the URL of the image.

Example

This example loads "image1.jpg" and Fits it to the WebImageViewer control.

Visual BasicCopy Code
Public Sub WebImageViewer_InitWebImageViewer(ByVal mainWebImageViewer As WebImageViewer)
   mainWebImageViewer.HorizontalAlignMode = ImageViewerAlignMode.Center
   mainWebImageViewer.VerticalAlignMode = ImageViewerAlignMode.Center
   mainWebImageViewer.BrowserImageFormat = BrowserImageFormat.Jpeg
   mainWebImageViewer.CacheFolder = "MyCacheFolderName"
   mainWebImageViewer.SizeMode = ImageViewerSizeMode.FitAlways
   mainWebImageViewer.ResourcesPath = "Resources"
   mainWebImageViewer.DropShadowColor = Color.LightGray
   mainWebImageViewer.DropShadowSize = 10
   mainWebImageViewer.ImageBorderSize = 20
   mainWebImageViewer.ImageFrameColor = Color.DarkGray
   mainWebImageViewer.ImageFrameSize = 10
   mainWebImageViewer.ImageUrl = "Resources\Image1.jpg"
End Sub
C#Copy Code
public void WebImageViewer_InitWebImageViewer(WebImageViewer mainWebImageViewer)
{
   mainWebImageViewer.HorizontalAlignMode = ImageViewerAlignMode.Center;
   mainWebImageViewer.VerticalAlignMode = ImageViewerAlignMode.Center;
   mainWebImageViewer.BrowserImageFormat = BrowserImageFormat.Jpeg;
   mainWebImageViewer.CacheFolder = "MyCacheFolderName";
   mainWebImageViewer.SizeMode = ImageViewerSizeMode.FitAlways;
   mainWebImageViewer.ResourcesPath = "Resources";
   mainWebImageViewer.DropShadowColor = Color.LightGray;
   mainWebImageViewer.DropShadowSize = 10;
   mainWebImageViewer.ImageBorderSize = 20;
   mainWebImageViewer.ImageFrameColor = Color.DarkGray;
   mainWebImageViewer.ImageFrameSize = 10;
   mainWebImageViewer.ImageUrl = @"Resources\Image1.jpg";
}
JavaScriptCopy Code
function WebImageViewer_InitWebImageViewer(mainWebImageViewer)
{
   mainWebImageViewer.setHorizontalAlignMode(ImageViewerAlignMode.Center);
   mainWebImageViewer.setVerticalAlignMode(ImageViewerAlignMode.Center);
   mainWebImageViewer.setSizeMode(ImageViewerSizeMode.FitAlways);
   mainWebImageViewer.setDropShadowColor('#D3D3D3');
   mainWebImageViewer.setDropShadowSize(10);
   mainWebImageViewer.setImageBorderSize(20);
   mainWebImageViewer.setImageFrameColor('#A9A9A9');
   mainWebImageViewer.setImageFrameSize(10);
   mainWebImageViewer.OpenImageUrl("Resources\\Image1.jpg");
}

Remarks

This property should be in a URL (Uniform Resource Identifier) style.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also