I am trying to prevent the closing of the Menus of a Menu control in Wpf when we click out of his area.
My objective is if we for example have a Menu control in the top of the window. We then open any of the menus, and if we click somewhere in the window, the Menu closes. That is what I am wanting to prevent from happening.
What I want is only when the click happens on one of the Menu items, or in its header then the Menu can close...
Anyone know how to achieve this in Wpf?
Thanks in advance!
There is a similar question available, here is the solution posted:
Just set the
StaysOpen
property to true