ItemImageBorderStyle Property

Summary

Gets or sets the border style to draw around the image of an RasterImageListItem in the control.

Syntax

C#
C++/CLI
C++
public BorderStyle ItemImageBorderStyle { get; set; } 
public: 
property BorderStyle ItemImageBorderStyle { 
   BorderStyle get(); 
   void set (    BorderStyle ); 
} 
public:  
   property BorderStyle^ ItemImageBorderStyle 
   { 
      BorderStyle^ get() 
      void set(BorderStyle^ value) 
   } 

Property Value

A BorderStyle enumeration that specifies the border to draw around the image of an RasterImageListItem in the control.

Remarks

The ItemImageBorderStyle property is only supported when the value of the ViewStyle is set to RasterImageListViewStyle.Normal

When changing any of the item sizes or styles, you should pay special attention to the values you specify, in general, you should setup ItemSize to be large enough to accommodate ItemImageSize plus room for ItemBorderStyle and ItemImageBorderStyle. If you set the ShowItemText property to true, then you should also accommodate room for the item text in your calculations.

For more information about item appearance, refer to RasterImageList Appearance.

Example

C#
using Leadtools.WinForms; 
using Leadtools; 
using Leadtools.Codecs; 
using Leadtools.Drawing; 
 
public void RasterImageList_ItemBorderStyle(RasterImageList imageList) 
{ 
   // Apply our custom item styles 
 
   imageList.BeginUpdate(); 
 
   // Make sure we are using Normal style 
   imageList.ViewStyle = RasterImageListViewStyle.Normal; 
 
   // Draw a border around the item 
   imageList.ItemBorderStyle = BorderStyle.FixedSingle; 
 
   // Draw a border around the image inside each item 
   imageList.ItemImageBorderStyle = BorderStyle.FixedSingle; 
 
   // Leave 10 pixels between each adjucent items 
   imageList.ItemSpacingSize = new Size(10, 10); 
 
   // Apply a dark cyan/white color scheme 
   imageList.ItemForeColor = Color.DarkCyan; 
   imageList.ItemSelectedForeColor = Color.White; 
   imageList.ItemBackColor = Color.White; 
   imageList.ItemSelectedBackColor = Color.DarkCyan; 
 
   imageList.EndUpdate(); 
} 

Requirements

Target Platforms

See Also

Reference

RasterImageList Class

RasterImageList Members

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

Leadtools.WinForms Assembly

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