Gets or sets the brush used to draw the border of each item.
public Brush ItemBorderBrush {get; set;}Public Property ItemBorderBrush As BrushA System.Windows.Media.Brush that is used draw the border of each item. Default value is a black System.Windows.Media.SolidColorBrush.
Imports Leadtools.Windows.ControlsImports Leadtools.CodecsImports LeadtoolsPrivate Class MyWindow2 : Inherits WindowPublic imageList As ImageListPublic Sub New(ByVal title As String)title = title' Set the size of the windowWidth = 400Height = 200' Create a new ImageList control.imageList = New ImageList()imageList.Width = Double.NaNimageList.Height = Double.NaNimageList.Background = New RadialGradientBrush(Colors.DarkGray, Colors.LightGray)imageList.ItemBorderBrush = Brushes.YellowimageList.ItemStyle = ImageListItemStyle.NormalimageList.ItemBorderThickness = New Thickness(5)imageList.ItemMargin = New Thickness(10)imageList.ItemSize = New Size(250, 250)imageList.ItemImageSize = New Size(200, 200)imageList.ItemSelectedForeground = Brushes.BlueimageList.ItemSelectedBackground = Brushes.WhiteimageList.BorderThickness = New Thickness(5)' Create three itemsDim imagesPath As String = LEAD_VARS.ImagesDirFor i As Integer = 0 To 2' Load the imageDim index As Integer = i + 1Dim imageFileName As String = Path.Combine(imagesPath, "ImageProcessingDemo\Image" & index.ToString() & ".jpg")Dim item As ImageListItem = New ImageListItem()item.Source = New BitmapImage(New Uri(imageFileName))item.Text = "item" & index.ToString()' Select the first itemIf i = 0 Thenitem.IsSelected = TrueEnd If' Add the item to the image listimageList.Items.Add(item)Next i' Add the ImageList to the Window.Content = imageListEnd SubEnd ClassPublic Sub ImageList_ItemBorderBrush(ByVal title As String)Dim window As MyWindow2 = New MyWindow2(title)window.ShowDialog()End SubPublic NotInheritable Class LEAD_VARSPublic Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"End Class
using Leadtools.Help;using Leadtools.Windows.Controls;using Leadtools;using Leadtools.Codecs;class MyWindow2 : Window{public ImageList imageList;public MyWindow2(string title){Title = title;// Set the size of the windowWidth = 400;Height = 200;// Create a new ImageList control.imageList = new ImageList();imageList.Width = Double.NaN;imageList.Height = Double.NaN;imageList.Background = new RadialGradientBrush(Colors.DarkGray, Colors.LightGray);imageList.ItemBorderBrush = Brushes.Yellow;imageList.ItemStyle = ImageListItemStyle.Normal;imageList.ItemBorderThickness = new Thickness(5);imageList.ItemMargin = new Thickness(10);imageList.ItemSize = new Size(250, 250);imageList.ItemImageSize = new Size(200, 200);imageList.ItemSelectedForeground = Brushes.Blue;imageList.ItemSelectedBackground = Brushes.White;imageList.BorderThickness = new Thickness(5);// 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() + ".jpg");ImageListItem item = new ImageListItem();item.Source = new BitmapImage(new Uri(imageFileName));item.Text = "item" + index.ToString();// Select the first itemif (i == 0)item.IsSelected = true;// Add the item to the image listimageList.Items.Add(item);}// Add the ImageList to the Window.Content = imageList;}}public void ImageList_ItemBorderBrush(string title){MyWindow2 window = new MyWindow2(title);window.ShowDialog();}static class LEAD_VARS{public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";}
using Leadtools.Help;using Leadtools.Windows.Controls;class MyWindow2 : ChildWindow{public ImageList imageList;public MyWindow2(string title){Title = title;// Set the size of the windowWidth = 400;Height = 200;// Create a new ImageList control.imageList = new ImageList();imageList.Width = Double.NaN;imageList.Height = Double.NaN;imageList.Background = new RadialGradientBrush(Colors.DarkGray, Colors.LightGray);imageList.ItemBorderBrush = new SolidColorBrush(Colors.Yellow);imageList.ItemStyle = ImageListItemStyle.Normal;imageList.ItemBorderThickness = new Thickness(5);imageList.ItemMargin = new Thickness(10);imageList.ItemSize = new Size(250, 250);imageList.ItemImageSize = new Size(200, 200);imageList.ItemSelectedForeground = new SolidColorBrush(Colors.Blue);imageList.ItemSelectedBackground = new SolidColorBrush(Colors.White);imageList.BorderThickness = new Thickness(5);// Create three itemsstring imagesPath = LeadtoolsExamples.Common.ImagesPath.Path;for (int i = 0; i < 3; i++){// Load the imageint index = i + 1;string imageFileName = imagesPath + "Image" + index.ToString() + ".jpg";ImageListItem item = new ImageListItem();item.Source = new BitmapImage(new Uri(imageFileName));item.Text = "item" + index.ToString();// Select the first itemif (i == 0)item.IsSelected = true;// Add the item to the image listimageList.Items.Add(item);}// Add the ImageList to the Window.Content = imageList;}}public void ImageList_ItemBorderBrush(string title){MyWindow2 window = new MyWindow2(title);window.Show();}
Imports Leadtools.Windows.ControlsPrivate Class MyWindow2 : Inherits ChildWindowPublic imageList As ImageListPublic Sub New(ByVal title As String)title = title' Set the size of the windowWidth = 400Height = 200' Create a new ImageList control.imageList = New ImageList()imageList.Width = Double.NaNimageList.Height = Double.NaNimageList.Background = New RadialGradientBrush(Colors.DarkGray, Colors.LightGray)imageList.ItemBorderBrush = New SolidColorBrush(Colors.Yellow)imageList.ItemStyle = ImageListItemStyle.NormalimageList.ItemBorderThickness = New Thickness(5)imageList.ItemMargin = New Thickness(10)imageList.ItemSize = New Size(250, 250)imageList.ItemImageSize = New Size(200, 200)imageList.ItemSelectedForeground = New SolidColorBrush(Colors.Blue)imageList.ItemSelectedBackground = New SolidColorBrush(Colors.White)imageList.BorderThickness = New Thickness(5)' Create three itemsDim imagesPath As String = LeadtoolsExamples.Common.ImagesPath.PathFor i As Integer = 0 To 2' Load the imageDim index As Integer = i + 1Dim imageFileName As String = imagesPath & "Image" & index.ToString() & ".jpg"Dim item As ImageListItem = New ImageListItem()item.Source = New BitmapImage(New Uri(imageFileName))item.Text = "item" & index.ToString()' Select the first itemIf i = 0 Thenitem.IsSelected = TrueEnd If' Add the item to the image listimageList.Items.Add(item)Next i' Add the ImageList to the Window.Content = imageListEnd SubEnd ClassPublic Sub ImageList_ItemBorderBrush(ByVal title As String)Dim window As MyWindow2 = New MyWindow2(title)window.Show()End Sub
<Windowxmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:Leadtools_Windows_Controls="clr-namespace:Leadtools.Windows.Controls;assembly=Leadtools.Windows.Controls"Height="600" Width="800" Title="ItemBorderBrush Sample"><DockPanel><Leadtools_Windows_Controls:ImageListName="theImageList"DockPanel.Dock= "Bottom"HorizontalAlignment="Center" VerticalAlignment="Bottom" ItemBorderBrush="Red" ItemSelectedForeground="Blue" ItemSelectedBackground="Yellow"><Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\cannon.jpg" Text="slave.jpg"/><Leadtools_Windows_Controls:ImageListItem Source="file:///c:\users\Public\Documents\LEADTOOLS Images\clean.tif" Text="clean.tif"/></Leadtools_Windows_Controls:ImageList></DockPanel></Window>
|
Products |
Support |
Feedback: ItemBorderBrush Property - Leadtools.Windows.Controls |
Introduction |
Help Version 19.0.2017.3.22
|

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.