Gets the file page number for the RasterImageListItem if this item represent a single page is a multi page file.
public int FilePageNumber { get; set; }
Public Property FilePageNumber As Integer
The 1-based page number index in Image to display. The default value is 1.
This property is valid only when calling LoadThumbnails(string,string,rasterthumbnailbrowserloadflags) and the flags paramter set to RasterThumbnailBrowserLoadFlags.ExpandMultiPage
This example will create and populate a RasterImageList control with thumbnails of the pages in the multi-page image file.
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
public void RasterImageListItem_Page(RasterImageList imageList)
{
// Initialize the RasterCodecs class
RasterCodecs codecs = new RasterCodecs();
// Clear existing items
imageList.Items.Clear();
// Load a multi-page file
string fileName = Path.Combine(LEAD_VARS.ImagesDir, "eye.gif");
RasterImage image = codecs.Load(fileName);
// Create the items (1 for each page)
for (int page = 1; page <= image.PageCount; page++)
{
RasterImageListItem item = new RasterImageListItem();
item.Image = image; // Use the same image for all items
item.Page = page; // But with a different page number
item.Text = "Page " + page.ToString();
// Add the item to the image list
imageList.Items.Add(item);
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\Users\Public\Documents\LEADTOOLS Images";
}
Imports Leadtools.WinForms
Imports Leadtools
Imports Leadtools.Codecs
Public Sub RasterImageListItem_Page(ByVal imageList As RasterImageList)
' Initialize the RasterCodecs class
Dim codecs As RasterCodecs = New RasterCodecs()
' Clear existing items
imageList.Items.Clear()
' Load a multi-page file
Dim fileName As String = Path.Combine(LEAD_VARS.ImagesDir, "eye.gif")
Dim image As RasterImage = codecs.Load(fileName)
' Create the items (1 for each page)
Dim page As Integer = 1
Do While page <= image.PageCount
Dim item As RasterImageListItem = New RasterImageListItem()
item.Image = image ' Use the same image for all items
item.Page = page ' But with a different page number
item.Text = "Page " & page.ToString()
' Add the item to the image list
imageList.Items.Add(item)
page += 1
Loop
End Sub
Public NotInheritable Class LEAD_VARS
Public Const ImagesDir As String = "C:\Users\Public\Documents\LEADTOOLS Images"
End Class
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