Gets or sets the border style to draw around the
RasterImageListItem in the control.
Syntax
Example
This example changes the border style around the image list items.
Visual Basic | Copy Code |
---|
Public Sub RasterImageList_ItemBorderStyle(ByVal imageList As RasterImageList)
imageList.BeginUpdate()
imageList.ViewStyle = RasterImageListViewStyle.Normal
imageList.ItemBorderStyle = BorderStyle.FixedSingle
imageList.ItemImageBorderStyle = BorderStyle.FixedSingle
imageList.ItemSpacingSize = New Size(10, 10)
imageList.ItemForeColor = Color.DarkCyan
imageList.ItemSelectedForeColor = Color.White
imageList.ItemBackColor = Color.White
imageList.ItemSelectedBackColor = Color.DarkCyan
imageList.EndUpdate()
End Sub |
C# | Copy Code |
---|
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(); } |
Remarks
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also