Saturday, September 1, 2012

Tooltip on disabled ContextMenu Item in Silverlight

Tooltip on disabled ContextMenu Item in Silverlight

I need to show a Tooltip on some disabled ContextMenu items. I tried the workaround using borders and putting the Tooltip and menu item in the borders, but my menu design completely messes up, setting Margin, Padding and BorderThickness to 0 doesn't help.
Any ideas ? Another approach ?
Thanks in advance

Answers & Comments...

Answer: 1

Ok, i got it, thanks to vinod8812. I gave my MenuItem a style with different VisualStates, then i just needed to change the VisualState of my MenuItem to "Disabled", the tooltip works fine.

VisualStateManager.GoToState(menutitem, "Disabled", true); 

Not a perfect solution, but will work so far.

by : Narekhttp://stackoverflow.com/users/606416




No comments:

Post a Comment

Send us your comment related to the topic mentioned on the blog