WPF Image Tooltip

后端 未结 1 1891
栀梦
栀梦 2021-01-05 17:06

I have a tooltip on an image inside of a listbox. The tooltip is setup as follows:



        
相关标签:
1条回答
  • 2021-01-05 17:45

    You don't need extra {} prefix in ContentStringFormat. With ToolTip, also prefer using ContentStringFormat instead of StringFormat in binding.

    Following works:

    <Image.ToolTip>
        <ToolTip Content="{Binding}"
                    ContentStringFormat="Ping: {0}ms" />
    </Image.ToolTip>
    
    0 讨论(0)
提交回复
热议问题