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

DropDownButton with any drop down content #2612

Closed
shawnshaddock opened this issue Aug 17, 2016 · 7 comments
Closed

DropDownButton with any drop down content #2612

shawnshaddock opened this issue Aug 17, 2016 · 7 comments

Comments

@shawnshaddock
Copy link

It would be nice if there was a DropDownButton that could contain any drop down content instead of being an ItemsControl with a ContextMenu.

An example of one can be seen in Telerik's WPF control library
http://docs.telerik.com/devtools/wpf/controls/radbuttons/features/dropdown-button

The DropDownContent property is of type Object, so any UI element can be added to it.

@punker76
Copy link
Member

@shawnshaddock This issue should be aalready fixed with #2572

@shawnshaddock
Copy link
Author

@punker76 I was unable to find where this was implemented. Do you happen to have a sample demonstrating how it works? Thanks!

@punker76
Copy link
Member

@shawnshaddock You can use Items property to add what you want.

<Controls:DropDownButton Content="The Content" Orientation="Vertical">
    <Controls:DropDownButton.Items>
        <ListBoxItem Content="A ListBoxItem" />
        <TextBlock Text="A TextBlock" />
    </Controls:DropDownButton.Items>
    <Controls:DropDownButton.Icon>
        <Viewbox Width="32" Height="32" Stretch="Uniform">
            <ContentControl Content="{DynamicResource appbar_journal}" Focusable="False" />
        </Viewbox>
    </Controls:DropDownButton.Icon>
</Controls:DropDownButton>

2016-08-18_10h18_32

@shawnshaddock
Copy link
Author

@punker76 That's not quite what I was suggesting. To better illustrate the product I am talking about, consider the FireFox menu button. It is much more then a button with a context menu, the drop down contains rich UI content.
ff-29-tour-1

@punker76
Copy link
Member

@shawnshaddock Now I understand what you want. But I think the Firefox custom drop doen button is also not a real drop down with context menu, it's really custom. So I think what you need is more like this one #1603

@shawnshaddock
Copy link
Author

@punker76 Yes, it is not a context menu. Telerik has designed their DropDownButton just like this. The drop down part is just a popup, and they provide a DropDownContent property which is of type object and can contain any UI. This would be a great addition to MahApps.Metro, maybe call it DropDownContentButton? I could potentially contribute to the effort of developing this control.

I have had a lot of success developing complex drop down content from a button using this control from Telerik in other projects. I will provide a screenshot of a customer search I implemented using it. The search results grid doesn't display until the drop down button is activated.
dropdowncontentbutton

@koen-debacker
Copy link
Contributor

What @shawnshaddock and I are looking for is a control like the XCeed WPF Toolkit DropDownButton, but Metro-styled.

@punker76 would you consider reopening this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants