Error processing SSI file
(Leadtools.Controls)

Show in webframe

Size Property (ImageViewerItem)




Size of the item.
Syntax
public LeadSize Size {get; set;}
'Declaration
 
Public Property Size As LeadSize

Property Value

The size of the whole item, including any margins, borders and padding. Default value is 0,0.
Remarks

For more information, refer to Image Viewer Items.

Example
Copy Code  
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color

Dim sizes As LeadSize() = New LeadSize() {LeadSize.Create(200, 100), LeadSize.Create(100, 200), _
                                          LeadSize.Create(200, 100), LeadSize.Create(200, 100), _
                                          LeadSize.Create(100, 200), LeadSize.Create(200, 100), _
                                          LeadSize.Create(200, 100), LeadSize.Create(200, 100), _
                                          LeadSize.Create(200, 100), LeadSize.Create(200, 100), LeadSize.Create(200, 100)}
Dim itemIndex As Integer = 0
_imageViewer.BeginTransform()
For Each size As LeadSize In sizes
   Dim image As RasterImage = RasterImage.Create(size.Width, size.Height, 32, 96, RasterColor.FromKnownColor(RasterKnownColor.White))
   Dim item As ImageViewerItem = New ImageViewerItem()
   item.Size = LeadSize.Create(image.ImageWidth, image.ImageHeight)
   item.Text = "Item" & itemIndex.ToString()
   item.Image = image

   _imageViewer.Items.Add(item)
   itemIndex += 1
Next size
_imageViewer.EndTransform()
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using Leadtools.ImageProcessing;
using Leadtools.ImageProcessing.Color;

LeadSize[] sizes = new LeadSize[]
{
   LeadSize.Create(200, 100),
   LeadSize.Create(100, 200),
   LeadSize.Create(200, 100),
   LeadSize.Create(200, 100),
   LeadSize.Create(100, 200),
   LeadSize.Create(200, 100),
   LeadSize.Create(200, 100),
   LeadSize.Create(200, 100),
   LeadSize.Create(200, 100),
   LeadSize.Create(200, 100),
   LeadSize.Create(200, 100),
};
int itemIndex = 0;
_imageViewer.BeginTransform();
foreach (LeadSize size in sizes)
{
   RasterImage image = RasterImage.Create(size.Width, size.Height, 32, 96, RasterColor.FromKnownColor(RasterKnownColor.White));
   ImageViewerItem item = new ImageViewerItem();
   item.Size = LeadSize.Create(image.ImageWidth, image.ImageHeight);
   item.Text = "Item" + itemIndex.ToString();
   item.Image = image;

   _imageViewer.Items.Add(item);
   itemIndex++;
}
_imageViewer.EndTransform();
Requirements

Target Platforms

See Also

Reference

ImageViewerItem Class
ImageViewerItem Members

Error processing SSI file