←Select platform

Size Property

Summary

Size of the item.

Syntax
C#
C++/CLI
public LeadSize Size { get; set; } 
public:  
   property LeadSize^ Size 
   { 
      LeadSize^ get() 
      void set(LeadSize^ value) 
   } 

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
C#
using Leadtools; 
using Leadtools.Controls; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
using Leadtools.ImageProcessing; 
using Leadtools.ImageProcessing.Color; 
using Leadtools.Svg; 
 
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

Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.Controls Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.