Gets or sets the Leadtools.Drawing.RasterPaintProperties which controls the painting of item images in this control.
[BrowsableAttribute(false)]public RasterPaintProperties PaintProperties {get; set;}
[BrowsableAttribute(false)]public:property RasterPaintProperties PaintProperties {RasterPaintProperties get();void set ( RasterPaintProperties );}
An Leadtools.Drawing.RasterPaintProperties structure which controls the painting of item images in this control.
If the item image has a transparent color (RasterImage.Transparent is set to true) then the RasterImageList control will automatically revert to the GDI+ paint engine. It will temporarily set the RasterPaintProperties.PaintEngine value of the PaintProperties property to RasterPaintEngine.GdiPlus when drawing this item.
using Leadtools.WinForms;using Leadtools;using Leadtools.Codecs;using Leadtools.Drawing;class MyForm1 : Form{public RasterImageList imageList;public MyForm1(string title){Text = title;// Set the size of the formSize = new Size(400, 200);// Create a new RasterImageList control.imageList = new RasterImageList();imageList.Bounds = new Rectangle(new Point(0, 0), Size);imageList.Sorting = SortOrder.Ascending;imageList.BorderStyle = BorderStyle.None;imageList.DoubleBuffer = true;imageList.Dock = DockStyle.Fill;RasterPaintProperties paintProperties = imageList.PaintProperties;paintProperties.PaintDisplayMode = RasterPaintDisplayModeFlags.Bicubic;imageList.PaintProperties = paintProperties;imageList.EnableKeyboard = true;imageList.UseDpi = true;// Add a handler to the PaintBackground eventimageList.PaintBackground += new PaintEventHandler(rasterImageList_PaintBackground);RasterCodecs codecs = new RasterCodecs();// Create three itemsstring imagesPath = LEAD_VARS.ImagesDir;for (int i = 0; i < 3; i++){// Load the imageint index = i + 1;string imageFileName = Path.Combine(imagesPath, @"ImageProcessingDemo\Image" + index.ToString() + ".cmp");RasterImage image = codecs.Load(imageFileName, 0, CodecsLoadByteOrder.BgrOrGray, 1, 1);RasterImageListItem item = new RasterImageListItem(image, 1, "Item" + index.ToString());// Select the first itemif (i == 0)item.Selected = true;// Add the item to the image listimageList.Items.Add(item);}// Add the RasterImageList to the control collection.Controls.Add(imageList);}private void rasterImageList_PaintBackground(object sender, PaintEventArgs e){// Get the image list controlRasterImageList imageList = sender as RasterImageList;// Fill the background with a gradient brushRectangle rc = imageList.ClientRectangle;Brush b = new LinearGradientBrush(rc,Color.Bisque,Color.White,LinearGradientMode.Vertical);e.Graphics.FillRectangle(b, rc);b.Dispose();}}public void RasterImageList_RasterImageList(string title){MyForm1 form = new MyForm1(title);form.ShowDialog();}static class LEAD_VARS{public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";}
RasterThumbnailBrowser Members
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
