开发者

Help with binding in WPF

<Image Source="sourceHere" Stretch="Uniform" Width="100" Height="100">
    <Image.ToolTip>
        <Image Source="{Binding thisImage.Source}" Stretch="Uniform" />
    </Image.ToolTip>
</Image>

the parent image is a 开发者_Go百科thumbnail of a bitmap, but I want the tooltip to show the image with 100% size.

How can I bind the image within the tooltip to the parent's source?


<Image x:Name="thisImage" Source="sourceHere" Stretch="Uniform" Width="100" Height="100">
    <Image.ToolTip>
        <Image Source="{Binding ElementName=thisImage, Path=Source}" Stretch="Uniform" />
    </Image.ToolTip>
</Image>

should do it

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜