question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

DropDownButton should allow for group styles

See original GitHub issue

Describe the feature

Currently it seems like the DropDownButton does not allow for grouping items together (as for example seen in the ComboBox). The snipped below is an implementation of it in the Demo App, that should work, but doesnt seem like it does.


            <Controls:DropDownButton Margin="5"
                                     Content="Genres"
                                     DisplayMemberPath="Name"
                                     ItemsSource="{Binding Source={x:Static models:SampleData.Genres}}">
                <Controls:DropDownButton.GroupStyle>
                    <GroupStyle>
                        <GroupStyle.HeaderTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding Path=Name}"/>
                            </DataTemplate>
                        </GroupStyle.HeaderTemplate>
                    </GroupStyle>
                </Controls:DropDownButton.GroupStyle>
            </Controls:DropDownButton>

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
AKruiminkcommented, Aug 28, 2020

I had a look at the spitbutton yesterday, didn’t offer much more to me then the dropdown button already did. The optimal controller would have been the combobox, was it not for the hassle it introduces when trying to deselect an item from the viewmodel, thats wat got me to use the DropDownButton, i assumed it would offer support for headers (which i was wrong in).

That being said, i did some resorting of my list and it looks alot cleaner now even without the headers, and don’t think would should change wat the DropDown is right now, and try to make it into a controller that it isn’t/isn’t suppoe to be.

0reactions
timuniecommented, Aug 28, 2020

Maybe the SplitButton can be used for your need case?

Read more comments on GitHub >

github_iconTop Results From Across the Web

CSS: proper styling for button dropdown within ...
I would only need this to cover one dropdown button within a button group and only dropdown buttons that appear right in the...
Read more >
DropdownButton class - material library - Dart API
A dropdown button lets the user select from a number of items. The button shows the currently selected item as well as an...
Read more >
Dropdowns
Dropdowns are toggleable, contextual overlays for displaying lists of links and more. They're made interactive with the included Bootstrap dropdown ...
Read more >
Dropdowns: Design Guidelines
Dropdown boxes and menus are overused and clunky but can be useful for revealing a list of options or commands.
Read more >
Dropdowns
DropdownButton will forward Button props to the underlying Toggle component ... Opt into darker dropdowns to match a dark navbar or custom style...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found