MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.32k stars 2.45k forks source link

SplitButton with custom style does not allow popup to stay open #2821

Closed frankiereyes closed 5 years ago

frankiereyes commented 7 years ago

What steps will reproduce this issue?

I have created a sample application which demonstrates using a custom style for a SplitButton with a ContextMenu. This pattern was working for my application using v.1.1.2 of MahApps. However, in v1.4.1, after clicking the dropdown button, the OnIsKeyboardFocusWithinChanged method within SplitButton.cs immediately closes the popup that contains the ContextMenu, so I can never select an option from the ContextMenu.

Expected outcome

Controls within SplitButton template with popups should stay open when clicking the dropdown.

--

Environment

MahAppsSplitButton.zip

punker76 commented 5 years ago

I’m closing this issue because it has been inactive for a few months. This probably means that it is not reproducible or it has been fixed in a newer version. If it’s an enhancement and hasn’t been taken on for so long, then it seems no one has the time to implement this.

The SplitButton control and style is implemented with a ListBox inside the Popup. If you want to use something different like your custom SplitButton with a ContextMenu then you need to do some additional changes as you already does.

Please reopen if you still encounter this issue with the latest stable version and then please use the issue template.

If you have enough time then it would be nice to test this issue against the latest alpha version (availabe via NuGet and appveyor).

Thank you! 🙏