C#
VB
C++
Gets or sets the brush used to draw the border of each item.
public Brush ItemBorderBrush { get; set; }
Public Property ItemBorderBrush As Brush
A System.Windows.Media.Brush that is used draw the border of each item. Default value is a black System.Windows.Media.SolidColorBrush.
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 window
Width = 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 items
string imagesPath = LEAD_VARS.ImagesDir;
for (int i = 0; i < 3; i++)
{
// Load the image
int 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 item
if (i == 0)
item.IsSelected = true;
// Add the item to the image list
imageList.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";
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Codecs
Imports Leadtools
Private Class MyWindow2 : Inherits Window
Public imageList As ImageList
Public Sub New(ByVal title As String)
title = title
' Set the size of the window
Width = 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 items
Dim imagesPath As String = LEAD_VARS.ImagesDir
For i As Integer = 0 To 2
' Load the image
Dim index As Integer = i + 1
Dim 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 item
If i = 0 Then
item.IsSelected = True
End If
' Add the item to the image list
imageList.Items.Add(item)
Next i
' Add the ImageList to the Window.
Content = imageList
End Sub
End Class
Public Sub ImageList_ItemBorderBrush(ByVal title As String)
Dim window As MyWindow2 = New MyWindow2(title)
window.ShowDialog()
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
using Leadtools.Help;
using Leadtools.Windows.Controls;
class MyWindow2 : ChildWindow
{
public ImageList imageList;
public MyWindow2(string title)
{
Title = title;
// Set the size of the window
Width = 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 items
string imagesPath = LeadtoolsExamples.Common.ImagesPath.Path;
for (int i = 0; i < 3; i++)
{
// Load the image
int 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 item
if (i == 0)
item.IsSelected = true;
// Add the item to the image list
imageList.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.Controls
Private Class MyWindow2 : Inherits ChildWindow
Public imageList As ImageList
Public Sub New(ByVal title As String)
title = title
' Set the size of the window
Width = 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 items
Dim imagesPath As String = LeadtoolsExamples.Common.ImagesPath.Path
For i As Integer = 0 To 2
' Load the image
Dim index As Integer = i + 1
Dim 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 item
If i = 0 Then
item.IsSelected = True
End If
' Add the item to the image list
imageList.Items.Add(item)
Next i
' Add the ImageList to the Window.
Content = imageList
End Sub
End Class
Public Sub ImageList_ItemBorderBrush(ByVal title As String)
Dim window As MyWindow2 = New MyWindow2(title)
window.Show()
End Sub
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