ComponentFactory.Krypton.Toolkit.KryptonContextMenu.KryptonContextMenu C# (CSharp) Method

KryptonContextMenu() public method

Initialize a new instance of the KryptonContextMenu class.
public KryptonContextMenu ( ) : System
return System
        public KryptonContextMenu()
        {
            // Setup the need paint delegate
            _needPaintDelegate = new NeedPaintHandler(OnNeedPaint);

            // Set default settings
            _localPalette = null;
            _paletteMode = PaletteMode.Global;
            _images = new ContextMenuImages(_needPaintDelegate);
            _redirector = new PaletteRedirect(null);
            _redirectorImages = new PaletteRedirectContextMenu(_redirector, _images);
            _enabled = true;

            // Create the palette storage
            _stateCommon = new PaletteContextMenuRedirect(_redirector, _needPaintDelegate);
            _stateNormal = new PaletteContextMenuItemState(_stateCommon);
            _stateDisabled = new PaletteContextMenuItemState(_stateCommon);
            _stateHighlight = new PaletteContextMenuItemStateHighlight(_stateCommon);
            _stateChecked = new PaletteContextMenuItemStateChecked(_stateCommon);

            // Create the top level collection for menu items
            _items = new KryptonContextMenuCollection();
        }