C#
VB
C++
Identifies the BitmapScalingMode dependency property.
public static readonly DependencyProperty BitmapScalingModeProperty
Public Shared ReadOnly BitmapScalingModeProperty As DependencyProperty
public:
static readonly DependencyProperty^ BitmapScalingModeProperty
The identifier for the BitmapScalingMode dependency property.
using Leadtools.Help;
using Leadtools.Windows.Controls;
using Leadtools.Codecs;
class MyWindow1 : Window
{
public ImageList imageList;
public MyWindow1(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.Items.SortDescriptions.Clear();
imageList.Background = new RadialGradientBrush(Colors.DarkGray, Colors.LightGray);
imageList.Items.SortDescriptions.Add(new SortDescription("Text", ListSortDirection.Ascending));
imageList.BorderThickness = new Thickness(5, 5, 5, 5);
// Create three items
string imagesPath = LEAD_VARS.ImagesDir;
for (int i = 0; i < 3; i++)
{
int index = i + 1;
string imageFileName = Path.Combine(imagesPath, @"ImageProcessingDemo\Image" + index.ToString() + ".jpg");
ImageListItem item = new ImageListItem();
item.Uri = new Uri(imageFileName);
item.Text = imageFileName;
item.ShowText = true;
item.Source = new BitmapImage(new Uri(imageFileName));
item.ImageSize = new Size(120, 120);
item.Width = 150;
item.Height = 150;
item.SelectedBackground = Brushes.White;
item.SelectedForeground = Brushes.Blue;
// Select the first item
if (i == 0)
item.IsSelected = true;
// Add the item to the image list
imageList.Items.Add(item);
}
imageList.Width = 200;
imageList.Height = 200;
// Add the ImageList to the Window.
Content = imageList;
}
}
public void ImageListItem_ImageSize(string title)
{
MyWindow1 window = new MyWindow1(title);
window.ShowDialog();
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Codecs
Private Class MyWindow1 : 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.Items.SortDescriptions.Clear()
imageList.Background = New RadialGradientBrush(Colors.DarkGray, Colors.LightGray)
imageList.Items.SortDescriptions.Add(New SortDescription("Text", ListSortDirection.Ascending))
imageList.BorderThickness = New Thickness(5, 5, 5, 5)
' Create three items
Dim imagesPath As String = LEAD_VARS.ImagesDir
For i As Integer = 0 To 2
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.Uri = New Uri(imageFileName)
item.Text = imageFileName
item.ShowText = True
item.Source = New BitmapImage(New Uri(imageFileName))
item.ImageSize = New Size(120, 120)
item.Width = 150
item.Height = 150
item.SelectedBackground = Brushes.White
item.SelectedForeground = Brushes.Blue
' 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 ImageListItem_ImageSize(ByVal title As String)
Dim window As MyWindow1 = New MyWindow1(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;
using Leadtools.Codecs;
class MyWindow1 : ChildWindow
{
public ImageList imageList;
public MyWindow1(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.BorderThickness = new Thickness(5, 5, 5, 5);
// Create three items
string imagesPath = LeadtoolsExamples.Common.ImagesPath.Path;
for (int i = 0; i < 3; i++)
{
int index = i + 1;
string imageFileName = imagesPath + "Image" + index.ToString() + ".jpg";
ImageListItem item = new ImageListItem();
item.Uri = new Uri(imageFileName);
item.Text = imageFileName;
item.ShowText = true;
item.Source = new BitmapImage(new Uri(imageFileName));
item.ImageSize = new Size(120, 120);
item.Width = 150;
item.Height = 150;
item.SelectedBackground = new SolidColorBrush(Colors.White);
item.SelectedForeground = new SolidColorBrush(Colors.Blue);
// 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 ImageListItem_ImageSize(string title)
{
MyWindow1 window = new MyWindow1(title);
window.Show();
}
Imports Leadtools.Windows.Controls
Imports Leadtools.Codecs
Private Class MyWindow1 : 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.BorderThickness = New Thickness(5, 5, 5, 5)
' Create three items
Dim imagesPath As String = LeadtoolsExamples.Common.ImagesPath.Path
For i As Integer = 0 To 2
Dim index As Integer = i + 1
Dim imageFileName As String = imagesPath & "Image" & index.ToString() & ".jpg"
Dim item As ImageListItem = New ImageListItem()
item.Uri = New Uri(imageFileName)
item.Text = imageFileName
item.ShowText = True
item.Source = New BitmapImage(New Uri(imageFileName))
item.ImageSize = New Size(120, 120)
item.Width = 150
item.Height = 150
item.SelectedBackground = New SolidColorBrush(Colors.White)
item.SelectedForeground = New SolidColorBrush(Colors.Blue)
' 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 ImageListItem_ImageSize(ByVal title As String)
Dim window As MyWindow1 = New MyWindow1(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