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

AppButtonMenuProvider() public method

Initialize a new instance of the ContextMenuProvider class.
public AppButtonMenuProvider ( ViewContextMenuManager viewManager, KryptonContextMenuItemCollection menuCollection, ViewLayoutStack viewColumns, IPalette palette, PaletteMode paletteMode, PaletteRedirect redirector, NeedPaintHandler needPaintDelegate ) : System
viewManager ViewContextMenuManager View manager used to organize keyboard events.
menuCollection KryptonContextMenuItemCollection Top level set of menu items.
viewColumns ComponentFactory.Krypton.Toolkit.ViewLayoutStack Stack used for adding new columns.
palette IPalette Local palette setting to use initially.
paletteMode PaletteMode Palette mode setting to use initially.
redirector ComponentFactory.Krypton.Toolkit.PaletteRedirect Redirector used for obtaining palette values.
needPaintDelegate NeedPaintHandler Delegate used to when paint changes occur.
return System
        public AppButtonMenuProvider(ViewContextMenuManager viewManager,
                                     KryptonContextMenuItemCollection menuCollection,
                                     ViewLayoutStack viewColumns,
                                     IPalette palette,
                                     PaletteMode paletteMode,
                                     PaletteRedirect redirector,
                                     NeedPaintHandler needPaintDelegate)
        {
            // Store incoming state
            _viewManager = viewManager;
            _menuCollection = menuCollection;
            _viewColumns = viewColumns;
            _palette = palette;
            _paletteMode = paletteMode;
            _redirector = redirector;
            _needPaintDelegate = needPaintDelegate;

            // Create all other state
            _parent = null;
            _enabled = true;
            _canCloseMenu = true;
            _showHorz = KryptonContextMenuPositionH.After;
            _showVert = KryptonContextMenuPositionV.Top;
            _stateCommon = new PaletteContextMenuRedirect(redirector, needPaintDelegate);
            _stateNormal = new PaletteContextMenuItemState(_stateCommon);
            _stateDisabled = new PaletteContextMenuItemState(_stateCommon);
            _stateHighlight = new PaletteContextMenuItemStateHighlight(_stateCommon);
            _stateChecked = new PaletteContextMenuItemStateChecked(_stateCommon);
            _redirectorImages = new PaletteRedirectContextMenu(redirector, new ContextMenuImages(needPaintDelegate));
        }