Size of the item.
public LeadSize Size { get; set; }
Public Property Size() As LeadSize
Get
Set
The size of the whole item, including any margins, borders and padding. Default value is 0,0.
For more information, refer to Image Viewer Items.
using Leadtools;
using Leadtools.Controls;
using Leadtools.Codecs;
using Leadtools.Drawing;
using LeadtoolsExamples.Common;
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();
Imports Leadtools
Imports Leadtools.Controls
Imports Leadtools.Codecs
Imports Leadtools.Drawing
Imports Leadtools.ImageProcessing
Imports Leadtools.ImageProcessing.Color
Imports LeadtoolsControlsExamples.LeadtoolsExamples.Common
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()
Products |
Support |
Feedback: Size Property (ImageViewerItem) - Leadtools.Controls |
Introduction |
Help Version 19.0.2017.6.20
|
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.