-
Notifications
You must be signed in to change notification settings - Fork 663
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an AppBarDropDownButton #172
Comments
A future UWP ribbon may have need for this, as well as versions of other controls when placed into a ribbon/tool bar. Thinner strokes on text and combobox fields for instance. |
@lhak, @mdtauk I think perhaps a more elegant solution to all of this is some sort of implied styling capability which I have hinted at in the Ribbon feature proposal. This solution allow base controls to perhaps implement interfaces which allow them to self-style when they are dropped in various containers, freeing us from class explosion. However, this implied styling feature needs to be detailed out and designed as well. Which will be part of nailing the design for the Ribbon architecture. Note: we decided instead to create an AppBarElementContainer in the short term to allow for these controls instead of creating various AppBar* variants. |
The idea of localised styles which override controls when they are placed into a panel, is very interesting. It would have to apply to the control without giving it a Style value. An initial thought of adding a ResourceDictionary to the Panel.Resources of the Ribbon Control maybe. Or perhaps taking the generic.xaml dictionary included in Microsoft.UI.Xaml package, adding in Styles and Templates for RibbonButton, RibbonComboBox, Ribbon SplitButton - and somehow translating the control's default template for these ones when placed in the Ribbon Control. |
Ok, for mow I will keep using a retemplated version of the MenuFlyoutPresenter to compensate for this gap. Is there any way to disable the shadow to keep a consistent look with the commandbar overflow menu? |
@jesbis and @chigy, can you comment on how to disable shadow in MenuFlyout? @lhak - thank you for this feature proposal. Sounds like you have a reasonable workaround for your scenario. Between your current approach and the option to use |
We appreciate the feedback, however this doesn’t currently align to the project’s goals and roadmap and so will be automatically closed. Thank you for your contributions to WinUI! |
Just a little thought about applying default styles to controls based on their container/parent...
Treating the TargetType and Style values more like a path to help make things more conditional? |
So there's also no chance for AppBarRepeatButton... |
Proposal: Add an AppBarDropDownButton
Summary
There is currently a DropDownButton control, but no corresponding control to place into a commandbar.
Rationale
Adding dropdown menus in a commandbar currently requires adding a (maybe retemplated) AppBarButton with an associated menuflyout. Unfortunately, even if the placement property of the Flyout is set, there is still a gap between both elements:
In comparison, the commandbar menu for secondary controls does not show this issue:
While it is possible to add workarounds to the application (e.g. manipulate the margins of the flyout), this should be handled automatically. As can be seen, the style of both flyout is also different (at least on the current windows insider build)
Functional Requirements
Usage Examples
Detailed Feature Design
Open Questions
The text was updated successfully, but these errors were encountered: