ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGalleryItem.ViewDrawRibbonGalleryItem C# (CSharp) Méthode

ViewDrawRibbonGalleryItem() public méthode

Initialize a new instance of the ViewDrawButton class.
public ViewDrawRibbonGalleryItem ( ComponentFactory.Krypton.Ribbon.KryptonGallery gallery, IPaletteTriple palette, ViewLayoutRibbonGalleryItems layout, NeedPaintHandler needPaint ) : System
gallery ComponentFactory.Krypton.Ribbon.KryptonGallery Owning gallery instance.
palette IPaletteTriple Palette used to recover values.
layout ViewLayoutRibbonGalleryItems Reference to item layout.
needPaint NeedPaintHandler Delegate for requesting paints.
Résultat System
        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;
        }