Add image to tooltip

I have TextBlocks with tooltips, and I would like to add an image to the tooltips (this means that I would like to have tooltips with text and images).

Does anyone know how I can do this in a simple way?

Thanks a lot!

+4
source share
2 answers

This is one way to get closer to it:

<TextBlock> <TextBlock.ToolTip> <StackPanel Orientation="Horizontal"> <Image Source="images/Item 2.gif" /> <TextBlock>My tooltip text</TextBlock> </StackPanel> </TextBlock.ToolTip> Here is my text. </TextBlock> 
+8
source

Instead

 <TextBlock ToolTip="Content"/> 

You can do:

 <TextBlock> <TextBlock.ToolTip> <!--insert everything you want here--> <TextBlock Text="Content"/> </TextBlock.ToolTip> </TextBlock> 
+1
source

Source: https://habr.com/ru/post/1440855/


All Articles