Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.5
|
Leadtools.Web.Controls Namespace > WebImageViewer Class : ImageUrl Property |
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
This example loads "image1.jpg" and Fits it to the WebImageViewer control.
Imports Leadtools Imports Leadtools.Codecs Imports Leadtools.ImageProcessing Imports Leadtools.Web.Controls <TestMethod()> _ 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
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"; }
/// <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> /// <!--Leadtools.Web.Controls.WebImageViewer.ImageUrl--> /// <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> /// <!--Leadtools.Web.Controls.WebImageViewer.OpenImageUrl--> /// <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> /// <!--Leadtools.Web.Controls.WebImageViewer.ApplyCommand--> 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"); }