LEADTOOLS WebForms and AJAX (Leadtools.Web assembly)
LEAD Technologies, Inc

ImageUrl Property

Example 





Gets or sets the URL of the image to be displayed
Syntax
public string ImageUrl {get; set;}
'Declaration
 
Public Property ImageUrl As String
'Usage
 
Dim instance As WebImageViewer
Dim value As String
 
instance.ImageUrl = value
 
value = instance.ImageUrl
public string ImageUrl {get; set;}
 get_ImageUrl();
set_ImageUrl(value);
public:
property String^ ImageUrl {
   String^ get();
   void set (    String^ value);
}

Property Value

A character string that contains the URL of the image.
Remarks
This property should be in a URL (Uniform Resource Identifier) style.
Example
 
Public Sub WebImageViewer_InitWebImageViewer(ByVal mainWebImageViewer As WebImageViewer)
   mainWebImageViewer.HorizontalAlignMode = ImageViewerAlignMode.Center
   mainWebImageViewer.VerticalAlignMode = ImageViewerAlignMode.Center
   mainWebImageViewer.BrowserImageFormat = BrowserImageFormat.Png

   ' Enable loading the text files.
   ' inputProfile.xml Contains the following:
   ' <ImageGenerator>
   '    <InputProfile>
   '       <TxtEnabled>true</TxtEnabled>
   '    </InputProfile>
   ' </ImageGenerator>
   mainWebImageViewer.InputProfile = mainWebImageViewer.Page.MapPath("Resources\inputProfile.xml")

   ' Set the quality factor for images displayed by the viewer, note that the BrowserImageFormat is set to Png.
   ' outputProfile.xml Contains the following:
   ' <ImageGenerator>   
   '    <OutputProfile>
   '       <PngQualityFactor>9</PngQualityFactor>
   '    </OutputProfile>
   ' </ImageGenerator>
   mainWebImageViewer.OutputProfile = mainWebImageViewer.Page.MapPath("Resources\outputProfile.xml")

   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\TextFile.txt"
End Sub
public void WebImageViewer_InitWebImageViewer(WebImageViewer mainWebImageViewer)
{
   mainWebImageViewer.HorizontalAlignMode = ImageViewerAlignMode.Center;
   mainWebImageViewer.VerticalAlignMode = ImageViewerAlignMode.Center;
   mainWebImageViewer.BrowserImageFormat = BrowserImageFormat.Png;
   // Enable loading the text files.
   // inputProfile.xml Contains the following:
   // <ImageGenerator>
   //    <InputProfile>
   //       <TxtEnabled>true</TxtEnabled>
   //    </InputProfile>
   // </ImageGenerator>
   mainWebImageViewer.InputProfile = mainWebImageViewer.Page.MapPath("Resources\\inputProfile.xml");

   // Set the quality factor for images displayed by the viewer, note that the BrowserImageFormat is set to Png.
   // outputProfile.xml Contains the following:
   // <ImageGenerator>   
   //    <OutputProfile>
   //       <PngQualityFactor>9</PngQualityFactor>
   //    </OutputProfile>
   // </ImageGenerator>
   mainWebImageViewer.OutputProfile = mainWebImageViewer.Page.MapPath("Resources\\outputProfile.xml");

   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\TextFile.txt";
}
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");
}
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

WebImageViewer Class
WebImageViewer Members
WebImageViewer Client Class

 

 


Products | Support | Contact Us | Copyright Notices

© 2006-2012 All Rights Reserved. LEAD Technologies, Inc.