VintaSoft Imaging .NET SDK 12.3: Documentation for .NET developer
In This Topic
    How to change thumbnail appearance?
    In This Topic
    Here is an example that shows how change the thumbnail appearance in ThumbnailViewer:
    // create the appearance of the normal thumbnail
    Vintasoft.Imaging.UI.ThumbnailAppearance thumbnailAppearance = 
        new Vintasoft.Imaging.UI.ThumbnailAppearance();
    thumbnailAppearance.BackColor = 
        System.Drawing.Color.FromArgb(32, System.Drawing.Color.Blue);
    thumbnailViewer.ThumbnailAppearance = thumbnailAppearance;
    
    // create the appearance of the focused thumbnail
    Vintasoft.Imaging.UI.ThumbnailAppearance focusedThumbnailAppearance = 
        new Vintasoft.Imaging.UI.ThumbnailAppearance();
    focusedThumbnailAppearance.BackColor = 
        System.Drawing.Color.FromArgb(32, System.Drawing.Color.Green);
    focusedThumbnailAppearance.BorderColor = System.Drawing.Color.Red;
    focusedThumbnailAppearance.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Dotted;
    focusedThumbnailAppearance.BorderWidth = 1;
    thumbnailViewer.FocusedThumbnailAppearance = focusedThumbnailAppearance;
    
    // create the appearance of the hovered thumbnail
    Vintasoft.Imaging.UI.ThumbnailAppearance hoveredThumbnailAppearance = 
        new Vintasoft.Imaging.UI.ThumbnailAppearance();
    hoveredThumbnailAppearance.BackColor = 
        System.Drawing.Color.FromArgb(32, System.Drawing.Color.Orange);
    hoveredThumbnailAppearance.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Inset;
    hoveredThumbnailAppearance.BorderWidth = 2;
    thumbnailViewer.HoveredThumbnailAppearance = hoveredThumbnailAppearance;
    
    // create the appearance of the selected thumbnail
    Vintasoft.Imaging.UI.ThumbnailAppearance selectedThumbnailAppearance = 
        new Vintasoft.Imaging.UI.ThumbnailAppearance();
    selectedThumbnailAppearance.BorderColor = System.Drawing.Color.Yellow;
    selectedThumbnailAppearance.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Dashed;
    selectedThumbnailAppearance.BorderWidth = 2;
    thumbnailViewer.SelectedThumbnailAppearance = selectedThumbnailAppearance;
    
    // create the appearance of the not ready thumbnail
    Vintasoft.Imaging.UI.ThumbnailAppearance notReadyThumbnailAppearance = new Vintasoft.Imaging.UI.ThumbnailAppearance();
    notReadyThumbnailAppearance.BackColor = System.Drawing.Color.Black;
    thumbnailViewer.NotReadyThumbnailAppearance = notReadyThumbnailAppearance;
    
    ' create the appearance of the normal thumbnail
    Dim thumbnailAppearance As New Vintasoft.Imaging.UI.ThumbnailAppearance()
    thumbnailAppearance.BackColor = System.Drawing.Color.FromArgb(32, System.Drawing.Color.Blue)
    thumbnailViewer.ThumbnailAppearance = thumbnailAppearance
    
    ' create the appearance of the focused thumbnail
    Dim focusedThumbnailAppearance As New Vintasoft.Imaging.UI.ThumbnailAppearance()
    focusedThumbnailAppearance.BackColor = System.Drawing.Color.FromArgb(32, System.Drawing.Color.Green)
    focusedThumbnailAppearance.BorderColor = System.Drawing.Color.Red
    focusedThumbnailAppearance.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Dotted
    focusedThumbnailAppearance.BorderWidth = 1
    thumbnailViewer.FocusedThumbnailAppearance = focusedThumbnailAppearance
    
    ' create the appearance of the hovered thumbnail
    Dim hoveredThumbnailAppearance As New Vintasoft.Imaging.UI.ThumbnailAppearance()
    hoveredThumbnailAppearance.BackColor = System.Drawing.Color.FromArgb(32, System.Drawing.Color.Orange)
    hoveredThumbnailAppearance.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Inset
    hoveredThumbnailAppearance.BorderWidth = 2
    thumbnailViewer.HoveredThumbnailAppearance = hoveredThumbnailAppearance
    
    ' create the appearance of the selected thumbnail
    Dim selectedThumbnailAppearance As New Vintasoft.Imaging.UI.ThumbnailAppearance()
    selectedThumbnailAppearance.BorderColor = System.Drawing.Color.Yellow
    selectedThumbnailAppearance.BorderStyle = System.Windows.Forms.ButtonBorderStyle.Dashed
    selectedThumbnailAppearance.BorderWidth = 2
    thumbnailViewer.SelectedThumbnailAppearance = selectedThumbnailAppearance
    
    ' create the appearance of the not ready thumbnail
    Dim notReadyThumbnailAppearance As New Vintasoft.Imaging.UI.ThumbnailAppearance()
    notReadyThumbnailAppearance.BackColor = System.Drawing.Color.Black
    thumbnailViewer.NotReadyThumbnailAppearance = notReadyThumbnailAppearance