Images in the middle on WP8,

152 Views Asked by At

Please, tell me, how can I place the image inside in the middle? Stretch: Uniform to fill. I want to focus was on the middle of the picture

Stretch: Uniform to fill

3

There are 3 best solutions below

0
On

If the aspect ratio of the image you want to put inside an Image control is not 1:1 and you set the aspect ratio of your Image control to 1:1 (e.g. Width="20" and Height="20" you will have a deformed image.

So, the best approach is, set the Width="20" but don't set the Height, let it calculate that automatically. Then, set Stretch="Uniform" (not uniform to fill). It should display the image correctly.

Hope this helps.

1
On

Why dont you Try setting your Image control set Stretch =Fill

<Image height="20" width="20" Stretch="Fill"/>
0
On

You can wrap the image inside a Border and set the HorizontalAlignment and VerticalAlignment attributes of your image to 'Center'.