2015-09-25 49 views
1

我正在开发一个Windows手机应用程序,并且想要制作类似于this的东西。Windows手机 - 平铺图片在中间和文字在底部

我试图用一个方形按钮,然后添加图片:

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

</Button> 

但我没有找到一种方法,在按钮的下方添加文本。

回答

1
<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> 
+0

谢谢Chris :) –

+0

@沃尔夫冈没有汗,有一个愉快的周末! –

+1

呵呵我可以补充一下,当你开始想要做一些真正的自定义/酷的东西,你会想开始深入到控件的样式模板,以得到你真正想要的东西....但我想到了答案现在就足够了。 –