FilePageNumber Property

Summary

Gets the file page number for the RasterImageListItem if this item represent a single page is a multi page file.

Syntax

C#
C++/CLI
C++
public int FilePageNumber { get; set; } 
public: 
property int FilePageNumber { 
   int get(); 
   void set (    int ); 
} 
public:  
   property Int32 FilePageNumber 
   { 
      Int32 get() 
      void set(Int32 value) 
   } 

Property Value

The 1-based page number index in Image to display. The default value is 1.

Remarks

This property is valid only when calling LoadThumbnails(String,String,RasterThumbnailBrowserLoadFlags) and the flags paramter set to RasterThumbnailBrowserLoadFlags.ExpandMultiPage

Example

This example will create and populate a RasterImageList control with thumbnails of the pages in the multipage image file.

C#
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:\LEADTOOLS22\Resources\Images"; 
} 

Requirements

Target Platforms

See Also

Reference

RasterImageListItem Class

RasterImageListItem Members

Help Version 22.0.2023.2.9
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

Leadtools.WinForms Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.