Leadtools.Web.Controls Namespace > WebThumbnailViewer Class > Add Method : Add(String,Int32,Int32) Method |
'Declaration Public Overloads Sub Add( _ ByVal imageUrl As String, _ ByVal firstPage As Integer, _ ByVal lastPage As Integer _ )
'Usage Dim instance As WebThumbnailViewer Dim imageUrl As String Dim firstPage As Integer Dim lastPage As Integer instance.Add(imageUrl, firstPage, lastPage)
Public Sub WebThumbnailViewer_InitWebThumbnailViewer(ByVal webThumbnailViewer As WebThumbnailViewer, ByVal webViewerID As String) webThumbnailViewer.CacheFolder = "MyCacheFolderName" webThumbnailViewer.ResourcesPath = "Resources" webThumbnailViewer.HorizontalAlignMode = ImageViewerAlignMode.Center webThumbnailViewer.VerticalAlignMode = ImageViewerAlignMode.Center webThumbnailViewer.LayoutDirection = LayoutDirection.Horizontal webThumbnailViewer.ThumbStyle.BackColor = Color.LightGray webThumbnailViewer.ThumbStyle.Cursor = "pointer" webThumbnailViewer.ThumbStyle.HoverBackColor = Color.Gray webThumbnailViewer.SelectedThumbStyle.BackColor = Color.Red webThumbnailViewer.SelectedThumbStyle.Cursor = "default" webThumbnailViewer.SelectedThumbStyle.HoverBackColor = Color.DarkRed webThumbnailViewer.ThumbPadding = 10 webThumbnailViewer.ThumbSpacing = 10 webThumbnailViewer.ViewerID = webViewerID webThumbnailViewer.ThumbSize = New Size(120, 120) webThumbnailViewer.BrowserImageFormat = BrowserImageFormat.Png ' Enable loading the text files. ' inputProfile.xml Contains the following: ' <ImageGenerator> ' <InputProfile> ' <TxtEnabled>true</TxtEnabled> ' </InputProfile> ' </ImageGenerator> webThumbnailViewer.InputProfile = webThumbnailViewer.Page.MapPath("Resources\inputProfile.xml") ' Set the quality factor for images displayed by the thumbnail viewer, note that the BrowserImageFormat is set to Png. ' outputProfile.xml Contains the following: ' <ImageGenerator> ' <OutputProfile> ' <PngQualityFactor>9</PngQualityFactor> ' </OutputProfile> ' </ImageGenerator> webThumbnailViewer.OutputProfile = webThumbnailViewer.Page.MapPath("Resources\outputProfile.xml") ' Prevent the Internet Explorer from loading the thumbnail images in the Temporary Internet Folder. webThumbnailViewer.DisableBrowserCaching = True webThumbnailViewer.Add("Resources\TextFile.txt", 1, -1) webThumbnailViewer.SelectedIndex = 0 End Sub
public void WebThumbnailViewer_InitWebThumbnailViewer(WebThumbnailViewer webThumbnailViewer, string webViewerID) { webThumbnailViewer.CacheFolder = "MyCacheFolderName"; webThumbnailViewer.ResourcesPath = @"Resources"; webThumbnailViewer.HorizontalAlignMode = ImageViewerAlignMode.Center; webThumbnailViewer.VerticalAlignMode = ImageViewerAlignMode.Center; webThumbnailViewer.LayoutDirection = LayoutDirection.Horizontal; webThumbnailViewer.ThumbStyle.BackColor = Color.LightGray; webThumbnailViewer.ThumbStyle.Cursor = "pointer"; webThumbnailViewer.ThumbStyle.HoverBackColor = Color.Gray; webThumbnailViewer.SelectedThumbStyle.BackColor = Color.Red; webThumbnailViewer.SelectedThumbStyle.Cursor = "default"; webThumbnailViewer.SelectedThumbStyle.HoverBackColor = Color.DarkRed; webThumbnailViewer.ThumbPadding = 10; webThumbnailViewer.ThumbSpacing = 10; webThumbnailViewer.ViewerID = webViewerID; webThumbnailViewer.ThumbSize = new Size(120, 120); webThumbnailViewer.BrowserImageFormat = BrowserImageFormat.Png; // Enable loading the text files. // inputProfile.xml Contains the following: // <ImageGenerator> // <InputProfile> // <TxtEnabled>true</TxtEnabled> // </InputProfile> // </ImageGenerator> webThumbnailViewer.InputProfile = webThumbnailViewer.Page.MapPath("Resources\\inputProfile.xml"); // Set the quality factor for images displayed by the thumbnail viewer, note that the BrowserImageFormat is set to Png. // outputProfile.xml Contains the following: // <ImageGenerator> // <OutputProfile> // <PngQualityFactor>9</PngQualityFactor> // </OutputProfile> // </ImageGenerator> webThumbnailViewer.OutputProfile = webThumbnailViewer.Page.MapPath("Resources\\outputProfile.xml"); // Prevent the Internet Explorer from loading the thumbnail images in the Temporary Internet Folder. webThumbnailViewer.DisableBrowserCaching = true; webThumbnailViewer.Add(@"Resources\TextFile.txt", 1, -1); webThumbnailViewer.SelectedIndex = 0; }
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