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 windowWidth = 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 itemsstring 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 itemif (i == 0)item.IsSelected = true;// Add the item to the image listimageList.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.ControlsImports Leadtools.CodecsPrivate Class MyWindow1 : 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.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 itemsDim imagesPath As String = LEAD_VARS.ImagesDirFor i As Integer = 0 To 2Dim index As Integer = i + 1Dim imageFileName As String = Path.Combine(imagesPath, "ImageProcessingDemo\Image" & index.ToString() & ".jpg")Dim item As ImageListItem = New ImageListItem()item.Uri = New Uri(imageFileName)item.Text = imageFileNameitem.ShowText = Trueitem.Source = New BitmapImage(New Uri(imageFileName))item.ImageSize = New Size(120, 120)item.Width = 150item.Height = 150item.SelectedBackground = Brushes.Whiteitem.SelectedForeground = Brushes.Blue' 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 ImageListItem_ImageSize(ByVal title As String)Dim window As MyWindow1 = New MyWindow1(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.Codecs;class MyWindow1 : ChildWindow{public ImageList imageList;public MyWindow1(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.BorderThickness = new Thickness(5, 5, 5, 5);// Create three itemsstring 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 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 ImageListItem_ImageSize(string title){MyWindow1 window = new MyWindow1(title);window.Show();}
Imports Leadtools.Windows.ControlsImports Leadtools.CodecsPrivate Class MyWindow1 : 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.BorderThickness = New Thickness(5, 5, 5, 5)' Create three itemsDim imagesPath As String = LeadtoolsExamples.Common.ImagesPath.PathFor i As Integer = 0 To 2Dim index As Integer = i + 1Dim imageFileName As String = imagesPath & "Image" & index.ToString() & ".jpg"Dim item As ImageListItem = New ImageListItem()item.Uri = New Uri(imageFileName)item.Text = imageFileNameitem.ShowText = Trueitem.Source = New BitmapImage(New Uri(imageFileName))item.ImageSize = New Size(120, 120)item.Width = 150item.Height = 150item.SelectedBackground = New SolidColorBrush(Colors.White)item.SelectedForeground = New SolidColorBrush(Colors.Blue)' 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 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
