VintaSoft Imaging .NET SDK v8.7
Vintasoft.Imaging.Wpf.UI Namespace / WpfImageViewerBase Class / MasterViewer Property
Example



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;}
    public: __property WpfImageViewerBase* get_MasterViewer();
    public: __property void set_MasterViewer( 
       WpfImageViewerBase* value
    );
    public:
    property WpfImageViewerBase^ MasterViewer {
       WpfImageViewerBase^ get();
       void set (    WpfImageViewerBase^ value);
    }
    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 example 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: Windows 10, Windows 8, Windows 7, Windows Vista, Windows XP, Windows Server 2012, Windows Server 2008, Windows Server 2003

    See Also