Search code examples
xamlwindows-phone

Windows phone - Tile with picture in the middle and text at the bottom


I'm working on a windows phone app , and wanted to make something similar to this.

I tried to use a square button then add a picture :

<Button Grid.Row="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="10">
                    <Button.Background>
                        <ImageBrush Stretch="Fill" ImageSource="Assets/Marker.png"/>
                    </Button.Background>

</Button>

But I didn't find a way to add text at the bottom of the button.


Solution

  • <Button Grid.Row="1" 
            HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
            VerticalContentAlignment="Bottom" HorizontalContentAlignment="Left"
            Margin="10">
                        <Button.Background>
                            <ImageBrush Stretch="Fill" ImageSource="Assets/Marker.png"/>
                        </Button.Background>
           Button Text
    </Button>