Is it possible to display menuitems in a menuitem without grouping it into a menu ?
<MenuItem Header="toto">
<MenuItem Header="Titi"></MenuItem>
</MenuItem>
This sample display the menu item toto, the expander image, but doesn’t show the subitem when mouse is over the toto item
Any idea ?
One solution :
XAML
Code behind :
Using XAML (Thanks HB for advice, 1st edit):
Can’t use IsHighlighted false, because it is still highlighted when mouse is not over it.
2nd edit : seems that there’s a bug when a showdialog windows is shown when menu is open. So we need to combine with MouseEnter event to prevent from this bug. (the bug is that the submenu does not open any more after the popup has been shown)