VintaSoft Imaging .NET SDK 14.0: Documentation for .NET developer
Vintasoft.Imaging.UI Namespace / ImageViewerBase Class / MasterViewer Property
Syntax Remarks Example Requirements SeeAlso
In This Topic
    MasterViewer Property (ImageViewerBase)
    In This Topic
    Gets or sets the main (master) viewer for this ImageViewerBase.
    Syntax
    'Declaration
    
    <DescriptionAttribute("Main (master) viewer for this viewer.")>
    <DefaultValueAttribute(null)>
    <CategoryAttribute("VintaSoft")>
    Public Property MasterViewer As ImageViewerBase
    
    
    [Description("Main (master) viewer for this viewer.")]
    [DefaultValue(null)]
    [Category("VintaSoft")]
    public ImageViewerBase MasterViewer { get; set; }
    
    
    [Description("Main (master) viewer for this viewer.")]
    [DefaultValue(null)]
    [Category("VintaSoft")]
    public: __property ImageViewerBase* get_MasterViewer();
    public: __property void set_MasterViewer(
    ImageViewerBase* value
    );
    [Description("Main (master) viewer for this viewer.")]
    [DefaultValue(null)]
    [Category("VintaSoft")]
    public:
    property ImageViewerBase^ MasterViewer { ImageViewerBase^ get(); void set(ImageViewerBase^ 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 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.UI.ThumbnailViewer, imageViewer As Vintasoft.Imaging.UI.ImageViewer)
        ' 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.UI.ThumbnailViewer thumbnailViewer,
        Vintasoft.Imaging.UI.ImageViewer imageViewer)
    {
        // set the image viewer as the master viewer of thumbnail viewer
        thumbnailViewer.MasterViewer = imageViewer;
    }
    
    

    Requirements

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

    See Also