Hi,
I want set (only) an individual brush for my XamMenuItems, if the mouse is over the item.
How do I this? The example in the feature browser is much complex! ;o(
Greets...Marco
HI,
Just following up on this forum thread,
Please let us know if you need further assistance.
Sincerely,
MattDeveloper Support Engineer
Hi Marco,
To change the Hover brush, you'll need to edit XamMenuItem's Template.
The easiest way to do this is to just reuse the default style, changing the values of "MenuItemMouseOver" and "MenuItemHighlighted" brushes.
You can find the default style in "Default Styles" folder under the installation path of NetAdvantage product (there is a shortcut in the Start Menu, pointing to that location).
I attached a sample, showing how you can do this. I simply copied the default style for the XamMenu , edited the two brushes I mentioned and added it as a MergedResourceDictionary in App.xaml.
It's an implicit style, so adding it as a MergedResourceDictionary in App.xaml means that this style will be applied to all XamMenus in the application, if another style is not explicitly set.
As for your second question, the arrow indicator is shown only for items in a submenus (non-root MenuItems) that have children. Could you explain what's your issue ? Are you not seeing arrow indicators in submenus, or do you want to show tem for Top-level items?
Regards,
there's another thing I want:
In design-mode there are arrows on the XamMenuItem, I want this arrows also at runtime! Why did they are hidden at runtime? How do I activate them at runtime?
In design-mode there is a black arrow:
At runtime the arrow is not visible:
My first question was, how can I change the cyan-color, if the mouse is over the XamMenuItem? It is not the background color!!
thanks...Marco