microsoft / microsoft/microsoft-ui-xaml
Proposal:Improvements to ```MenuFlyout```, ```CommandBarFlyout```, and ```TextCommandBarFlyout```
- Dominant language
- C++
- Stars
- 8.4k
- Forks
- 942
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 105
Description
### Title
Improvements to ```MenuFlyout```, ```CommandBarFlyout```, and ```TextCommandBarFlyout```
##### ----------------------------------------------
```MenuFlyout``` 、 ```CommandBarFlyout``` 和 ```TextCommandBarFlyout``` 的改进
### Summary
在最新的基于 WinUI 3 样式的记事本应用中,我们发现了记事本应用使用的右键菜单是用 ```MenuFlyout``` 构建的模仿 ```CommandBarFlyout```/```TextCommandBarFlyout``` 控件,复原度将近 95%。这说明了 ```CommandBarFlyout```/```TextCommandBarFlyout``` 完全可以基于 ```MenuFlyout``` 实现,而不是单独构建一个复杂的 ```CommandBarFlyout```/```TextCommandBarFlyout```。所以我在这边提议,希望 WinUI 团队能重新审视 ```CommandBarFlyout```/```TextCommandBarFlyout``` 控件,能在目前已有的 ```MenuFlyout``` 作出改进,而不是重新单独构建一个 ```CommandBarFlyout```/```TextCommandBarFlyout``` 控件。
##### --------------------------------------------------
In the latest WinUI 3-style notepad app, we found that the notepad app uses a ```CommandBarFlyout```/```TextCommandBarFlyout```-like control built with ```MenuFlyout``` with nearly 95% resiliency. This shows that ```CommandBarFlyout```/```TextCommandBarFlyout``` can be implemented entirely on MenuFlyout, rather than building a complex ```CommandBarFlyout```/```TextCommandBarFlyout``` separately. So I propose here that the WinUI team revisit the ```CommandBarFlyout```/```TextCommandBarFlyout``` controls and improve on the existing MenuFlyout, rather than rebuilding a separate ```CommandBarFlyout```/```TextCommandBarFlyout``` control.
--------------------------------------------------
使用 MenuFlyout 而不是目前的 CommandBarFlyout 控件的好处
```MenuFlyout``` 相比于 ```CommandBarFlyout``` 更轻量化,加载速度更快。
```CommandBarFlyout``` 的主题色存在问题,这一问题存在于所有的 WinUI 版本,到现在都没有修复。
```MenuFlyout``` 就可以实现 ```CommandBarFlyout``` 的功能,为什么要使用复杂的目前 ```CommandBarFlyout``` 控件?
```CommandBarFlyout``` 不支持自定义 ```CommandBarFlyoutPresenterStyle```,```MenuFlyout``` 支持 ```MenuFlyoutPresenterStyle```。
```MenuFlyout``` 有弹出动画,```CommandBarFlyout```/```TextCommandBarFlyout``` 没有弹出动画。
##### --------------------------------------------------
```MenuFlyout``` is lighter and loads faster than ```CommandBarFlyout```.
There is an issue with the theme color of ```CommandBarFlyout```, which exists in all WinUI versions and has not been fixed to date.
```MenuFlyout``` can implement the functionality of ```CommandBarFlyout```, so why use the complex current ```CommandBarFlyout``` control?
```CommandBarFlyout``` does not support custom ```CommandBarFlyoutPresenterStyle```, and ```MenuFlyout``` supports ```MenuFlyoutPresenterStyle```.
```MenuFlyout``` has a pop-up animation, while ```CommandBarFlyout```/```TextCommandBarFlyout``` does not have a pop-up animation.
--------------------------------------------------
记事本的模仿 ```CommandBarFlyout```/```TextCommandBarFlyout``` 的 ```MenuFlyout``` 实图
##### --------------------------------------------------
Notepad imitation of ```CommandBarFlyout```/```TextCommandBarFlyout```'s ```MenuFlyout``` real image
### Rationale
None
### Scope
| Capability | Priority |
| :---------- | :------- |
| This proposal will allow developers to accomplish W | Must |
| This proposal will allow end users to accomplish X | Should |
| This proposal will allow developers to accomplish Y | Could |
| This proposal will allow end users to accomplish Z | Won't |
### Important Notes
_No response_
### Open Questions
None
Contributor guide
Research direction
No implementation files, tests, or concrete entry points are identified. Start by reviewing the existing MenuFlyout, CommandBarFlyout, and TextCommandBarFlyout implementations and their documented behavior; a useful completion criterion would need to define which control changes are required and how compatibility and visual behavior will be validated.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100