开发者

Button with Image, Why does button command not fire when image is clicked?

The button command only fires if the mouse is not over the image when it is clicked. What am I missing?

<Button Cursor="Hand" Command="{Binding Path=SomeC开发者_运维技巧ommand}">
    <Image Source="image.png" />                         
</Button>


I think your image is swallowing your mouse clicks.

Try adding IsHitTestVisible="False" to your image.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜