ComponentFactory.Krypton.Ribbon.ViewDrawRibbonGalleryButton.ViewDrawRibbonGalleryButton C# (CSharp) Method

ViewDrawRibbonGalleryButton() public method

Initialize a new instance of the ViewDrawRibbonGalleryButton class.
public ViewDrawRibbonGalleryButton ( IPalette palette, PaletteRelativeAlign alignment, PaletteRibbonGalleryButton button, GalleryImages images, NeedPaintHandler needPaint ) : System
palette IPalette Reference to inherited palette.
alignment PaletteRelativeAlign Button alignment within gallery.
button PaletteRibbonGalleryButton Button content to display.
images ComponentFactory.Krypton.Toolkit.GalleryImages Button images.
needPaint NeedPaintHandler Paint event delegate.
return System
        public ViewDrawRibbonGalleryButton(IPalette palette,
                                           PaletteRelativeAlign alignment,
                                           PaletteRibbonGalleryButton button,
                                           GalleryImages images,
                                           NeedPaintHandler needPaint)
        {
            _palette = palette;
            _alignment = alignment;
            _button = button;
            _images = images;
            _needPaint = needPaint;
            _paletteBack = new PaletteBackToPalette(palette, PaletteBackStyle.ButtonGallery);
            _paletteBorder = new PaletteBorderToPalette(palette, PaletteBorderStyle.ButtonGallery);
            _paletteContent = new PaletteContentToPalette(palette, PaletteContentStyle.ButtonGallery);
            _controller = new GalleryButtonController(this, needPaint, (alignment != PaletteRelativeAlign.Far));
            _controller.Click += new MouseEventHandler(OnButtonClick);
            MouseController = _controller;
        }