Leadtools.Web Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
ThumbSize Property
See Also  Example
Leadtools.Web.Controls Namespace > WebThumbnailViewer Class : ThumbSize Property




Gets or sets the size of the thumbnail in pixels.

Syntax

Visual Basic (Declaration) 
Public Property ThumbSize As Size
Visual Basic (Usage)Copy Code
Dim instance As WebThumbnailViewer
Dim value As Size
 
instance.ThumbSize = value
 
value = instance.ThumbSize
C# 
public Size ThumbSize {get; set;}
Managed Extensions for C++ 
public: __property Size get_ThumbSize();
public: __property void set_ThumbSize( 
   Size value
);
C++/CLI 
public:
property Size ThumbSize {
   Size get();
   void set (Size value);
}

Return Value

The size of the thumbnail in pixels.

Example

Refer to Add

This example initializes the WebThumbnailViewer control and connect it to a WebImageViewer control, then loads "multipage.tif" file into it, and select the first thumbnail to display its image into the WebImageViewer control.

Visual BasicCopy Code
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.Add("Resources\multipage.tif", 1, -1)
   webThumbnailViewer.SelectedIndex = 0
End Sub
C#Copy Code
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.Add(@"Resources\multipage.tif", 1, -1); 
   webThumbnailViewer.SelectedIndex = 0; 
}

Remarks

The thumbnail image will be resized to fit the width or height of the ThumbSize.

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