Search

Atalasoft Knowledge Base

HOWTO: Add a Thumbnail Viewer to a WPF Application

Administrator
DotImage

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">
</stackpanel></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);
}

Original Article:
Q10328 - HOWTO: Adding a Thumbnail viewer to a WPF application

Details
Last Modified: 6 Years Ago
Last Modified By: Administrator
Type: HOWTO
Rated 1 star based on 1 vote
Article has been viewed 862 times.
Options
Also In This Category