VintaSoft Imaging .NET SDK v8.7
In This Topic
    View thumbnails in WPF
    In This Topic

    WpfThumbnailViewer is a WPF control designed to display thumbnails of associated image collection.

    WpfThumbnailViewer can work separately

    WpfThumbnailViewer can work as a slave viewer of another WpfImageViewer or WpfThumbnailViewer

    Here is an example that shows how to load images to ImageViewer, link ImageViewer with ThumbnailViewer and invert the first image in the image collection - the image in ImageViewer and the thumbnail in ThumbnailViewer will be inverted:
    wpfThumbnailViewer1.MasterViewer = wpfImageViewer1
    wpfThumbnailViewer1.MasterViewer = wpfImageViewer1;

    Appearance of thumbnails

    Size of thumbnails

    Thumbnails have two sizes:
    Physical size of thumbnails can be set with the WpfThumbnailViewer.ThumbnailSize property. The minimal physical size of thumbnail is 32x32 pixels, the maximal physical size of thumbnail is 1024x1024 pixels.

    Visible size of thumbnails can be set with the WpfThumbnailViewer.ThumbnailScale property. Visible size is calculated as multiplication of physical size and scaling factor.
    Here is a list of scaling factors:

    Two blocks of memory can be allocated for thumbnails:
    Thumbnails are created anew and memory for original thumbnails is allocated anew when WpfThumbnailViewer.ThumbnailSize is changed.

    Existing thumbnails are scaled when WpfThumbnailViewer.ThumbnailScale is changed, memory for scaled thumbnails is allocated if WpfThumbnailViewer.ThumbnailScale is not equal Normal.

    Important: Do not use large size of thumbnails if this is not necessary.

    Custom appearance of thumbnails

    Appearance of thumbnails in WpfThumbnailViewer can be changed with WPF style.

    WpfThumbnailViewer.ThumbnailContainerStyle property allows to get/set the current thumbnails style used in WpfThumbnailViewer.

    Standard thumbnails style is defined in ThumbnailImageItemStyle class.

    Main window of WpfImagingDemo (MainWindow.xaml file) contains a XAML code that show how to create custom style for thumbnails of WpfThumbnailViewer.

    Tooltip of thumbnails

    WpfThumbnailViewer allows to show tooltips for thumbnails.

    Tooltip of thumbnail can be set with the ThumbnailImageItem.ToolTip property.

    Manipulation of thumbnails

    Rendering of thumbnails

    WpfThumbnailViewer renders thumbnails in a separate threads, number of threads for thumbnail rendering can be set with the WpfThumbnailViewer.ThumbnailRenderingThreadCount property.

    During rendering of thumbnail the following events are generated:

    All thumbnails are generated by default. WpfThumbnailViewer.GenerateOnlyVisibleThumbnails property allows to generate only visible thumbnails, this can be necessary for slow computers.


    WpfThumbnailViewer allows to select thumbnails, selected thumbnails can be accessed with the WpfThumbnailViewer.SelectedThumbnails property.

    WpfThumbnailViewer.MultiSelect property allows to specify that multiple thumbnails can be selected.


    WpfThumbnailViewer allows drag-and-drop thumbnails. In order to drag the thumbnail, just hover your cursor on it, hold left mouse button and pull the cursor to the desired position.

    Drag-and-drop feature can be enabled/disabled with the WpfThumbnailViewer.AllowDrop or WpfThumbnailViewer.AllowDrag properties.

    Hot keys

    WpfThumbnailViewer has hot keys:
    Hot keys can be enabled/disabled with the WpfImageViewerBase.InputGestureCopy, WpfImageViewerBase.InputGestureCut, WpfImageViewerBase.InputGestureInsert, WpfImageViewerBase.InputGestureDelete, WpfThumbnailViewer.InputGestureSelectAll properties.
    Behaviour of hot keys can be overriden with the WpfImageViewerBase.GetCopyCommand, WpfImageViewerBase.GetCutCommand, WpfImageViewerBase.GetInsertCommand, WpfImageViewerBase.GetDeleteCommand methods.

    Context menu of thumbnail viewer

    WpfThumbnailViewer can have standard WPF context menu as any WPF control.