ImageGear .NET v25.2 - Updated
Loading Thumbnails in XAML
Developer Guide > How to Work with... > Common Operations > Viewing > Viewing with WPF > Controls for XAML Application Development > Thumbnail Control > Loading Thumbnails > Loading Thumbnails in XAML

The code below demonstrates how to set the ItemsSource to a collection of ImGearThumbnailPages. The ImGearThumbnailPageExtension class must be used to specify an ImGearThumbnailPage in XAML. The ImGearThumbnailPageCollection class in the XAML below must be specified in the code-behind as follows:

C# Example
Copy Code
public class ThumbnailPageCollection : ObservableCollection<object> { }
XAML Example
Copy Code
…
    <Window.Resources>
        <custom:ThumbnailPageCollection x:Key="thumbnails">
            <igwc:ImGearThumbnailPageExtension Caption="benefits" Source="c:\images\benefits.tif"/>
            <igwc:ImGearThumbnailPageExtension Caption="multi.tif Page 3" Source="c:\images\multi.tif" PageNumber="2"/>
            <igwc:ImGearThumbnailPageExtension Caption="bird" Source="c:\images\bird.jpg"/>
            <igwc:ImGearThumbnailPageExtension Caption="multi.tif Page 5" Source="c:\images\multi.tif" PageNumber="4"/>
        </custom:ThumbnailPageCollection>        
    </Window.Resources>
…
<igwc:ImGearThumbnailList ItemsSource="{StaticResource thumbnails}" Name="thumbnailList"/>
Is this page helpful?
Yes No
Thanks for your feedback.