←Select platform

ImageUrl Property

Summary

Gets or sets the URL of the image to be displayed

Syntax

C#
VB
C++
public string ImageUrl { get; set; } 
  
Public Property ImageUrl As String 
public: 
property String^ ImageUrl { 
   String^ get(); 
   void set (    String^ ); 
} 

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

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

C#
VB
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Web.Controls; 
using Leadtools.ImageProcessing; 
 
public void WebImageViewer_InitWebImageViewer() 
{ 
   WebImageViewer mainWebImageViewer = new 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 = @"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 = @"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"; 
} 
Imports Leadtools 
Imports Leadtools.Codecs 
Imports Leadtools.ImageProcessing 
Imports Leadtools.Web.Controls 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ScrollBarVisible--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ScrollBarVisible--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebImageViewer.PropertyChanged--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.AddWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.AddWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.InsertWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.InsertWithText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.EnsureVisible--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.EnsureVisible--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailImageByText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.GetThumbnailImageByText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.SetThumbnailText--> 
   ''' <!--Leadtools.Web.Controls.WebThumbnailViewer.SetThumbnailText--> 
 
Public Sub WebImageViewer_InitWebImageViewer() 
 
   Dim mainWebImageViewer As WebImageViewer = New 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 = "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 = "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 

Requirements

Target Platforms

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Web Assembly