/// <summary> /// Initialize a new instance of the ViewDrawMenuColorBlock class. /// </summary> /// <param name="provider">Reference to provider.</param> /// <param name="colorColumns">Reference to owning color columns entry.</param> /// <param name="color">Drawing color for the block.</param> /// <param name="first">Is this element first in column.</param> /// <param name="last">Is this element last in column.</param> /// <param name="enabled">Is this column enabled</param> public ViewDrawMenuColorBlock(IContextMenuProvider provider, KryptonContextMenuColorColumns colorColumns, Color color, bool first, bool last, bool enabled) { _provider = provider; _colorColumns = colorColumns; _color = color; _first = first; _last = last; _enabled = enabled; _blockSize = colorColumns.BlockSize; // Use context menu specific version of the radio button controller MenuColorBlockController mcbc = new MenuColorBlockController(provider.ProviderViewManager, this, this, provider.ProviderNeedPaintDelegate); mcbc.Click += new EventHandler(OnClick); MouseController = mcbc; KeyController = mcbc; }