[WP8.1] How to scale a background image of a button?
Mobile
1
Posts
1
Posters
0
Views
1
Watching
-
Hello, I am developing an app for Windows Phone 8.1 by using XALM and C# within a Windows Universal Project. My problem is that the background images of the buttons do not correctly scale. I want to use an image as the background of a button and the image should always scale to maximum size of the button, but keep the correct ratio (a circle shall always look like a circle and not like an ellipse!). I tried this:
<Button x:Name="buttonMeasurement" Grid.Row="9" Grid.Column="2" Grid.ColumnSpan="3" Content="" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" BorderThickness="0" Click="buttonMeasurement\_Click" > <Button.Background> </Button.Background> </Button>
But the background image of the button is cut at the top and the bottom! It seems that there is not enough vertical space (height) for the image. If I use
instead of