将图像添加到工具提示中

Gui*_*pos 5 wpf image textblock tooltip

我有一些带有工具提示的TextBlocks,我想在工具提示中添加一个图像(这意味着,我想要提供带有文本和图像的工具提示).

有谁知道我怎么能以简单的方式做到这一点?

非常感谢!

RQD*_*QDQ 11

这是接近它的一种方法:

<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>
Run Code Online (Sandbox Code Playgroud)