[英]Image Control with Tool Tip
我正在用C#创建WPF应用程序,并且具有带有图像的图像控件。 我希望它在鼠标悬停在ToolTip
上时ToolTip
带有图像和文本的ToolTip
。 因此,当鼠标悬停在图像上时,如何制作带有图像的ToolTip
。 在此先感谢您的帮助。
尝试这样的事情。
<!-- This is the image that has the tooltip -->
<Image Source="...">
<Image.ToolTip>
<!-- A tooltip can contain any element. Here we put a text
block and another image. -->
<StackPanel>
<TextBlock>This is the tooltip text</TextBlock>
<!-- This image appears inside the tooltip -->
<Image Source="..." />
</StackPanel>
</Image.ToolTip>
</Image>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.