microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.28k stars 675 forks source link

Proposal: MenuBar improvements to match Windows Community Toolkit #2216

Open michael-hawker opened 4 years ago

michael-hawker commented 4 years ago

Proposal: MenuBar improvements for parity with Windows Community Toolkit

Summary

A while back we deprecated the Menu control in the Windows Community Toolkit when MenuBar was added to WinUI. However, during our PR to remove the feature in our 6.0 release it was brought up that the MenuBar control doesn't have parity with the WinUI one, so we held off on removing it, see discussion in PR.

This proposal is about ensuring we can close the feature gap and remove the Menu control from the Toolkit hopefully later this summer?

Rationale

Scope

Capability Priority
Use Menu like an ItemsControl with ItemsSource and DataTemplating Must
Show Alt-key Underlines Option (ties into MenuBarItem not having KeyboardAccelerators) Must
Have MenuBarItem support Click/Command patterns for items or top-level menus see #2740 Must
Showing Alt-key Tooltips Options (old office style) Should
IsOpened Property for Menu and Selected/Opened MenuItems Could
Expose MenuFlyout/Tooltip/etc... Styles #1035 Could
Orientation supported see #1528, maybe a different control? Could

image

image

Important Notes

Was noticing some odd behavior in the Gallery, maybe because the menu's aren't at the top-level navigation?

Open Questions

michael-hawker commented 4 years ago

FYI @skendrot, please add on anything here if I've missed anything from the previous discussion in the toolkit PR.

ranjeshj commented 4 years ago

@adambarlow FYI

adambarlow commented 4 years ago

Thanks @michael-hawker. These are great additions to consider on the menubar. Let me circle around with folks and get back on potential timelines here.

michael-hawker commented 4 years ago

@adambarlow you can see where I do this comparison investigation from my live stream highlight here. That can also help highlight more easily some of the oddities I encountered in the Gallery app.

skendrot commented 4 years ago

@michael-hawker Looks good! I would say that being an ItemsControl isn't a requirement so long as it can bind items and children (hierarchical items).

michael-hawker commented 4 years ago

Thanks @skendrot, yeah I used the words 'like a' to signify I don't have to see it actually inheriting from ItemsControl (breaking change) as long as we can satisfy those same scenarios for data binding/templating.

michael-hawker commented 4 years ago

Added another gap from #2740 identified about Click/Command for MenuBarItem.

azchohfi commented 4 years ago

@adambarlow any update on this?

michael-hawker commented 1 year ago

Note: We are not migrating the Menu control to the Windows Community Toolkit v8.0 release. Therefore, anyone migrating from our old control to the WinUI 2/3 versions may encounter these issues still. FYI @bpulliam @chigy.