Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Issue: ColorPicker: The MenuItem behind the clicked color is also clicked [19327]

$
0
0
When selecting a color from the `ColorPicker` popup that placed inside a Menuitem, if there is a MenuItem behind the clicked color, it will also be clicked. In my case, the menu item that was unintentionally activated was "Undo", which undid the color selection. Therefore certain colors could never be selected.

The problem is that after the popup has been closed due to a `MouseDown`, the `MenuItem` will then get the `MouseUp`, unless the user keeps holding the mouse button down, moves it away, and then releases - unlikely. The popup should only close after a `MouseUp`.
Comments: ** Comment from web user: johnalammers **

A terrible hack, but I managed to work around this by setting a ignoreMouseUp flag on my ColorPicker.SelectedColorChanged and then looking for that in PreviewMouseUp of my menu items. If the flag's set, I swallow that event and clear the flag. Only really works because I'm building my context menu dynamically and can coordinate across items like this. Don't know that I'd be able to pull that off in a simpler or XAML-based scenario.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>