Reputation: 1317
I would like to create an image button where width and height of the button to be the same as of those of the image so that all we see is the image not the button. How can i do that?
PS. the reason that I am enclosing an image inside a button is that images are not focus-able I want to focus on an image by pressing tab key, but tab key just skips images
Upvotes: 0
Views: 31
Reputation: 935
Image control has Focusable property...
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<Image Grid.Row="0" Source="img1.png" Focusable="True" />
<Image Grid.Row="1" Source="img2.png" Focusable="True" />
</Grid>
Tab key works great.
Upvotes: 2