Skip to content
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

Closed
lhak opened this issue Jan 11, 2019 · 8 comments
Closed

Add an AppBarDropDownButton #172

lhak opened this issue Jan 11, 2019 · 8 comments
Labels
feature proposal New feature proposal team-Controls Issue for the Controls team

Comments

@lhak
Copy link

lhak commented Jan 11, 2019

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:

image

In comparison, the commandbar menu for secondary controls does not show this issue:

image

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

@mdtauk
Copy link
Contributor

mdtauk commented Jan 11, 2019

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.

@adambarlow
Copy link
Contributor

adambarlow commented Jan 12, 2019

@lhak, @mdtauk
At one point during the creation of the new button controls in RS5, e.g DropDownButton and ToggleButton, etc. we had to decide if we were going to continue down the road of class explosion with AppBar* everything. We knew we were going to need to have then later versions of all of these that also went into Ribbons as Martin mentioned above. At which point we would need Ribbon* controls, etc.

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.

@mdtauk
Copy link
Contributor

mdtauk commented Jan 12, 2019

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.
But that would probably need some platform changes to how XAML handles it's themeing/templates and styles.

@lhak
Copy link
Author

lhak commented Jan 19, 2019

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 jesbis added this to New proposal in Feature tracking Jan 24, 2019
@jevansaks jevansaks added this to Approved in Controls Triage Feb 11, 2019
@jevansaks jevansaks moved this from Approved to Approved - Assigned in Controls Triage Feb 22, 2019
@jevansaks jevansaks moved this from Approved - Assigned to Approved in Controls Triage May 7, 2019
@YuliKl
Copy link

YuliKl commented May 10, 2019

@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 AppBarElementContainer to place a DropDownButton into a CommandBar, I don't think it makes sense for us to add a new AppBarDropDownButton class.

@msft-github-bot
Copy link
Collaborator

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!

@msft-github-bot msft-github-bot removed this from Freezer in Feature tracking May 10, 2019
Controls Triage automation moved this from Approved to Closed May 10, 2019
@msft-github-bot msft-github-bot added this to Freezer in Feature tracking May 10, 2019
@mdtauk
Copy link
Contributor

mdtauk commented May 13, 2019

Just a little thought about applying default styles to controls based on their container/parent...

TargetType="AppBar/DropDownButton"

Treating the TargetType and Style values more like a path to help make things more conditional?

@jevansaks jevansaks added the team-Controls Issue for the Controls team label Nov 7, 2019
@kurema
Copy link

kurema commented Jan 18, 2020

So there's also no chance for AppBarRepeatButton...
I want RepeatButton in CommandBar, but OK. There's workaround.

@msft-github-bot msft-github-bot added the needs-triage Issue needs to be triaged by the area owners label Jan 18, 2020
@ranjeshj ranjeshj removed the needs-triage Issue needs to be triaged by the area owners label Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature proposal New feature proposal team-Controls Issue for the Controls team
Projects
Development

No branches or pull requests

9 participants