Home : WPF Viewing Controls : Adding a Thumbnail viewer to a WPF application
Q10328 - HOWTO: Adding a Thumbnail viewer to a WPF application

The DotImage controls do not include a ThumbnailViewer for WPF applications.  Instead, add an AtalaImageViewer inside a repeating control programmatically, such as a StackPanel or WrapPanel, and put that inside a ScrollViewer:

(XAML)

<ScrollViewer>

<StackPanel HorizontalAlignment="Stretch" Name="stackPanel1" VerticalAlignment="Stretch" CanVerticallyScroll="True" />

</ScrollViewer>

(Code-behind)

string filename = @"E:\demo images\usc.tif";

int frames = RegisteredDecoders.GetImageInfo(filename).FrameCount;

for (int i = 0; i < frames; i++)

{

AtalaImageViewer aiv = new AtalaImageViewer();

aiv.Height = 1000;

aiv.Width = 1000;

aiv.AutoZoom = AutoZoomMode.BestFit;

aiv.Open(filename, i, null);

stackPanel1.Children.Add(aiv);

}

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2017. InstantASP Ltd. All Rights Reserved