/// <summary> /// Initialize a new instance of the ViewDrawButton class. /// </summary> /// <param name="gallery">Owning gallery instance.</param> /// <param name="palette">Palette used to recover values.</param> /// <param name="layout">Reference to item layout.</param> /// <param name="needPaint">Delegate for requesting paints.</param> public ViewDrawRibbonGalleryItem(KryptonGallery gallery, IPaletteTriple palette, ViewLayoutRibbonGalleryItems layout, NeedPaintHandler needPaint) : base(palette, palette, palette, palette, null, null, VisualOrientation.Top, false) { _gallery = gallery; // We provide the content for the button ButtonValues = this; // Need controller to handle tracking/pressing etc _controller = new GalleryItemController(this, layout, needPaint); _controller.Click += new MouseEventHandler(OnItemClick); MouseController = _controller; SourceController = _controller; KeyController = _controller; }
/// <summary> /// Initialize a new instance of the ViewDrawButton class. /// </summary> /// <param name="gallery">Owning gallery instance.</param> /// <param name="palette">Palette used to recover values.</param> /// <param name="layout">Reference to item layout.</param> /// <param name="needPaint">Delegate for requesting paints.</param> public ViewDrawRibbonGalleryItem(KryptonGallery gallery, IPaletteTriple palette, ViewLayoutRibbonGalleryItems layout, NeedPaintHandler needPaint) : base(palette, palette, palette, palette, null, null, VisualOrientation.Top, false) { _gallery = gallery; // We provide the content for the button ButtonValues = this; // Need controller to handle tracking/pressing etc _controller = new GalleryItemController(this, layout, needPaint); _controller.Click += OnItemClick; MouseController = _controller; SourceController = _controller; KeyController = _controller; }