Yesterday I was about to use my brand new menu control in a new project, and after having recompiled and run the test with the brand new runtime…well…as usual the first problems arose.
It seems that some undocumented changes were made again to the event bubbling and mechanics…so when I was moving the mouse over some disabled menu items I saw the whole popup disappear.
The problem is caused by the fact that the menu is implemented like a bunch of buttons inside a StackPanel, the popup is closed when the MouseLeave event of the StackPanel is fired; with SL2RC0 when I move the mouse over a disabled button the StackPanel fire an ‘unwanted’ MouseLeave event too…this behaviour wasn’t present in SL2B2.
For some more info look at my post in Silverlight Forum: http://silverlight.net/forums/t/30778.aspx
The ‘Breaking Changes’ document doesn’t mention anything about the ‘new’ event system, so we are left alone and have to experiment a bit.
I have a workaround for this in mind but it will require a complete rework of the Menu Control, stay tuned for updates.
- Silverlight: Dropdown Menu Control (10/07/2008)
- Silverlight: How to Add a Context Menù to a FrameworkElement (26/08/2015)
- Silverlight: how to build a simple Menu Control (26/08/2015)
- Silverlight Pagination Control – bug fixed (26/08/2015)
- Silverlight: simulate a 'Windows' desktop application - part 1 (26/08/2015)
- More related document (42)