Silverlight Handle App MouseLeftButtonDown?

Posted by user492488 on Stack Overflow See other posts from Stack Overflow or by user492488
Published on 2011-01-13T11:37:39Z Indexed on 2011/01/13 14:54 UTC
Read the original article Hit count: 199

Hi All,

In my silverlight project I have a Context Menu (right click menu) that I want to close it if I click anywhere outside it. I add handler to the click event on App:

AddHandler App.Current.RootVisual.MouseLeftButtonDown, AddressOf HideMenu

But the problem that: it does not enter the Handler when I click on any other command, or click on the same control that have the context menu, it is enter only when I click on an empty area outside the menu.

Thanks.

© Stack Overflow or respective owner

Related posts about Silverlight

Related posts about mouseleftbuttondown