Make appearance of MenuStrip & ContextMenuStrip look native when RenderMode = System
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 1.1k
- Avg merge
- 1d 13m
- Merged PRs (30d)
- 85
Description
(split off from #2476)
### Windows 7
See #2476 for screenshots if needed.
### Windows 10
| Native | Strip (RenderMode = System) |
| --- | --- |
|  |  |
|  |  |
|  |  |
|  |  |
### List of Differences
It's probably not worth matching the look of Windows 7, so I will only consider differences from the Windows 10 look.
I have done measurements on 100% and 150% DPI, and marked those that change. I have not measured widths/heights of items, those seem mostly fine.
- **Main Menu**
- [ ] Menu height should be (19px * DPI)
- [ ] Make menu items flush with the left and top side of the window (no padding/border between them)
- [ ] 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)
- Note that item highlight overlays the bottom border and the top of sub-menus is just below the bottom border
- [ ] Set highlighted item background to RGB(204, 232, 255)
- [ ] Set highlighted item border to 1px of RGB(153, 209, 255)
- [ ] Do not invert text color of highlighted items
- [ ] Reduce left/right padding of menu items (appears to be 1px for border + (6px * DPI) of padding)
- **Context Menu & Main Menu sub-menus**
- [ ] Set border color to RGB(204, 204, 204)
- [ ] Set overall background color to RGB(242, 242, 242), so that non-highlighted items and padding between items and border is this color
- [ ] Set checkmark/image column background color to RGB(240, 240, 240)
- [ ] Set highlighted item background color to RGB(144, 200, 246)
- [ ] Fix the weird white line on the left of highlighted items
- [ ] Do not invert text color of highlighted items
- [ ] Increase padding between the items and border (1px -> 2px)
- [ ] Update icon of arrow on items with sub-menus and move it up by 1 px to center it
- [ ] Make splitter 1px tall
- [ ] Set splitter color to RGB(215, 215, 215)
- [ ] Fix splitter padding (it should not leak into the checkmark/image column, and be 2px from the right border)
- [ ] Set checkmark color to RGB(51, 51, 51)
- [ ] Checkmark should have a background color RGB(144, 200, 246) when checked, or RGB(86, 176, 250) when checked and highlighted at the same time
- [ ] Sub-menus should overlap their parent menu item by 6 pixels on the left, and be flush with the top
- [ ] After highlighting an item with a sub-menu and then moving cursor to a sibling item above/below, the original highlighted item should immediately become unhighlighted
- Currently the highlight lingers until the sub-menu disappears (see last screenshot)
It's a lot ^.^ but it should make them almost completely visually indistinguishable from native controls.
### (Updated) Test Project
[winforms.zip](https://github.com/dotnet/winforms/files/3990977/winforms.zip)
Contributor guide
Assessment
This issue has not been assessed yet.