

You might have to invest some work to reproduce the "theming on" style. you have the "theming on" style which is whatever the OS does natively, but I don't know if you can reproduce that in WinForms without using the deprecated HMENU based classes.you have the "theming off" style which is entirely based on SystemColors (you still get that sometimes over remote connections or server farms).If I remember right the general idea is that From a quick look you have no renderer using the theming API for menus/toolbars/statusbars (but I may have missed something).
#TOOLSTRIP VS MENUSTRIP CODE#
Some colors may be reused by theming, but the general model I have in mind is that theming uses a lot of hardcoded colors and rendering code which you only can get by going through the theming API. I'm not entirely sure if SystemColors (and SystemRenderer) will properly reflect theming. It's a lot ^.^ but it should make them almost completely visually indistinguishable from native controls.

#TOOLSTRIP VS MENUSTRIP UPDATE#
Update icon of arrow on items with sub-menus and move it up by 1 px to center it.Increase padding between the items and border (1px -> 2px).Fix the weird white line on the left of highlighted items.Set highlighted item background color to RGB(144, 200, 246).Set checkmark/image column background color to RGB(240, 240, 240).Set overall background color to RGB(242, 242, 242), so that non-highlighted items and padding between items and border is this color.Reduce left/right padding of menu items (appears to be 1px for border + (6px * DPI) of padding).Do not invert text color of highlighted items.Set highlighted item border to 1px of RGB(153, 209, 255).Set highlighted item background to RGB(204, 232, 255).Note that item highlight overlays the bottom border and the top of sub-menus is just below the bottom border.The menu background from top to bottom is (19px * DPI - 1px) of RGB(255, 255, 255), and then 1px bottom border of RGB(242, 242, 242).Make menu items flush with the left and top side of the window (no padding/border between them).

I have not measured widths/heights of items, those seem mostly fine. I have done measurements on 100% and 150% DPI, and marked those that change.
#TOOLSTRIP VS MENUSTRIP WINDOWS 10#
It's probably not worth matching the look of Windows 7, so I will only consider differences from the Windows 10 look. ToolStripMenuItems.AddRange(GetAllToolStripMenuItems(toolStripItem.DropDownItems)) īy using the above it becomes very straight forward to add what is needed by a click event.Īll ToolStripItems are wired up to use and just by adding the text to the ProcessMenuItem method and the code that is needed to execute it makes it pretty straight forward to add the needed code.See #2476 for screenshots if needed. Public static IEnumerable GetAllToolStripMenuItems(this ToolStripItemCollection toolStripItemCollection)įoreach (var toolStripItem in toolStripItemCollection.OfType()) Click += Item_Click ) } private void Item_Click ( object sender, EventArgs e ) ToList ( ) // Set All Click Events for controls InitializeComponent ( ) // Get All Menu Items and all Tool Strip Buttons into a list var toolStripItems = toolStrip1.
