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));
}