VintaSoft Imaging .NET SDK 15.1: Documentation for .NET developer
Vintasoft.Imaging.Wpf.UI Namespace / WpfImageViewerBase Class / MasterViewer Property
Syntax Remarks Example Requirements SeeAlso
In This Topic
MasterViewer Property (WpfImageViewerBase)
In This Topic
Gets or sets the main (master) viewer for this WpfImageViewerBase.
Syntax
'Declaration

Public Property MasterViewer As WpfImageViewerBase

public WpfImageViewerBase MasterViewer { get; set; }

Remarks

This property is necessary if several viewers must work with a single image collection. Typical example is the combination of thumbnail viewer and image viewer. The property affects properties Images and FocusedIndex.

Example

This C#/VB.NET code shows how to link thumbnail viewer and image viewer.


''' <summary>
''' Creates link between thumbnail viewer and image viewer.
''' </summary>
''' <param name="thumbnailViewer">Thumbnail viewer.</param>
''' <param name="imageViewer">Image viewer.</param>
Public Shared Sub LinkViewers(thumbnailViewer As Vintasoft.Imaging.Wpf.UI.WpfThumbnailViewer, imageViewer As Vintasoft.Imaging.Wpf.UI.WpfImageViewer)
    ' set the image viewer as the master viewer of thumbnail viewer
    thumbnailViewer.MasterViewer = imageViewer
End Sub


/// <summary>
/// Creates link between thumbnail viewer and image viewer.
/// </summary>
/// <param name="thumbnailViewer">Thumbnail viewer.</param>
/// <param name="imageViewer">Image viewer.</param>
public static void LinkViewers(
    Vintasoft.Imaging.Wpf.UI.WpfThumbnailViewer thumbnailViewer,
    Vintasoft.Imaging.Wpf.UI.WpfImageViewer imageViewer)
{
    // set the image viewer as the master viewer of thumbnail viewer
    thumbnailViewer.MasterViewer = imageViewer;
}

Requirements

Target Platforms: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

See Also