protected DropDownBase() { BackColor = SystemColors.Window; ForeColor = SystemColors.WindowText; AutoSize = false; AutoCheck = false; HighlightCheckedOpacity = 64; HighlightMouseOverOpacity = 64; VisibleAllBorders = true; Menu = new BorderedFlowLayoutPanel // because it's double-buffered { AutoSize = true, AutoSizeMode = AutoSizeMode.GrowAndShrink, BackColor = SystemColors.Window, FlowDirection = FlowDirection.TopDown, Margin = new Padding(0), Padding = new Padding(0), Visible = false, VisibleBorders = AnchorStyles.None }; MenuControl = Menu; MarginTop = -1; _menuItemsAccessor = new MenuItemsAccessor(Menu); _menuValuesAccessor = new MenuValuesAccessor(_menuItemsAccessor); }
public MenuValuesAccessor(MenuItemsAccessor menuItems) =>