using System.ComponentModel; using System.Windows.Forms; namespace Vanara.Windows.Shell { /// The toolbar associated with thumbnails shown when hovering over an application's taskbar button. /// [TypeConverter(typeof(ExpandableObjectConverter))] public class ThumbnailToolbar : INotifyPropertyChanged { private ImageList _imageList; /// Initializes a new instance of the class. public ThumbnailToolbar() { Buttons = new ThumbnailToolbarButtonCollection(this); Buttons.CollectionChanged += (s, e) => PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(Buttons))); } /// Occurs when a property has changed. public event PropertyChangedEventHandler PropertyChanged; /// Gets the buttons. /// The buttons. [Category("Appearance"), DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] public ThumbnailToolbarButtonCollection Buttons { get; } /// Gets or sets the image list for use by the toolbar buttons. /// The image list. public ImageList ImageList { get => _imageList; set { if (ReferenceEquals(_imageList, value)) return; _imageList = value; PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(ImageList))); } } } }