I am having problem in stretching my image to fill the button,I am new in UWP this is my code:
 <Grid  Margin="0,0,0,54" VerticalAlignment="Bottom" Height="39" Style="{Binding HorizontalAlignment, ElementName=grid}" ScrollViewer.HorizontalScrollBarVisibility="Auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Button Grid.Column="0"  Height="39" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
            <Image Source="images/icon1.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="True" d:LayoutRounding="Auto" />
        </Button>
        <Button Grid.Column="1"  Height="39" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
            <Image Source="images/icon2.png" Stretch="Fill" RenderTransformOrigin="0.5,0.5" UseLayoutRounding="True" d:LayoutRounding="Auto" />
        </Button>
</Grid>
You probably need to change the Padding and BorderThickness properties of the button. As code below :
    <Button Grid.Column="0" Height="39" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Padding="0" BorderThickness="0">
        <Image Source="Assets/microsoft.png" Stretch="UniformToFill"/>
    </Button>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With