ImageGear for .NET User Guide > Using ImageGear for .NET > Using ImageGear.Windows.Controls Namespace > Thumbnail Control > Loading Thumbnails > Loading All Pages of Multi-Page Files |
The ImGearThumbnailPage class can be used to specify specific pages of a multi-page file. To convert all pages of a multi-page file to ImGearThumbnailPages, you can use the ImGearThumbnailMultiPageAdapter class. This class can convert a collection of filename strings, Streams, or ImGearDocuments to a collection of ImGearThumbnailPages. The code below demonstrates how to use the ImGearThumbnailMultiPageAdapter to convert a collection of filename strings to a collection of ImGearThumbnailPages:
XAML Example |
Copy Code |
---|---|
<Window.Resources> <!--A list of filename strings can be specified as follows.--> <custom:FileNames x:Key="fileNames"> <sys:String>c:\images\bird.jpg</sys:String> <sys:String>c:\images\benefits.tif</sys:String> <sys:String>c:\images\multi.tif</sys:String> <sys:String>c:\images\window.jpg</sys:String> </custom:FileNames> <!--The multipage adapter can be used to convert source multipage documents to separate ImGearThumbnailPages.--> <igwc:ImGearThumbnailMultiPageAdapter x:Key="adapter" ItemsSource="{StaticResource fileNames}"/> </Window.Resources> … <!--Use the multipage adapter specified in the resources above to load all pages of multipage files.--> <igwc:ImGearThumbnailList ItemsSource="{StaticResource adapter}" Name="thumbnailList" /> … |
C# Example |
Copy Code |
---|---|
// The FileNames class derives from a List of strings and is specified in the code-behind as shown below. public class FileNames : List<string> { } |