Tooltips don't appear for context menu items
Posted: 22 Nov 2024, 01:15
I'm trying to add tooltips to context menu items, but finding that I can't get them to appear. Tooltips appear normally when I specify them on most other elements, but something with ContextMenu seems to prevent them from showing. Here's a snippet of my basic test case for this.
I've tried this in both Unity and xamltoy and confirmed that no tooltip appears on hover. Is there a way to display tooltips within context menus?
Hoping to utilize tooltips more and even swap out the tooltip text when certain context menu items are disabled as well.
Code: Select all
<Button Width="300" Height="300">
<Button.ContextMenu>
<ContextMenu>
<MenuItem Header="OPTION 1" ToolTip="Option 1 tooltip"/>
<MenuItem Header="OPTION 2" ToolTip="Option 2 tooltip"/>
</ContextMenu>
</Button.ContextMenu>
</Button>
Hoping to utilize tooltips more and even swap out the tooltip text when certain context menu items are disabled as well.