Multiple menus open on startup


When the Menu loads and the element is hovered, all the menus in the hierarchy are opened. This happens only for the first time. Later navigation do not have this issue. The screen shot is attached.
Can anyone tell me the work around for this. I am using the latest version 2.4.6.

file attachments


ZiadJ wrote Mar 3, 2012 at 8:29 AM

If you look at the PopupMenuBase constructor you'll see that it is hidden using the following line of code:

this.Visibility = Visibility.Collapsed;

Since it's in the constructor it is called before the menu is loaded which is just fine.

I could not reproduce it in my app. Could you please send me a sample code to illustrate it? My guess right now is that a function or style somewhere else in your code is altering it.

nikhilsoft wrote Mar 5, 2012 at 9:36 AM

I have attached the code in the file attached. I think its got to do with the Opacity setting in the Open function of PopupMenuBase. The Opacity is set to 1 before the menus are positioned.
However, I have overcome the problem by setting the TriggerTypes of the child menu on the Showing or Shown event of the Parent Menu. In the earlier code the TriggerTypes were set as shown in the attached code. Please let me know if there is any better way.