Leadtools.Web Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ImageUrl Property
See Also  Example
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);
}
JavaScript 
getImageUrl(): string;

Return 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 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also