[英]How to Draw a circle button and make label over it
我想制作一個圓形按鈕並在上面貼上標簽,但我不能,我試圖制作橢圓,但我不知道如何制作一個標簽。 我想制作出與此圖像完全相同的東西 Windows 8應用程序C#
使用網格,在網格中放置橢圓,然后放置TextBlock。
<Grid>
<Ellipse ... />
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" />
</Grid>
您可以嘗試以下方法:
<Grid>
<Ellipse StrokeThickness="2" Stroke="Black" Width="150">
<Ellipse.Fill>
<ImageBrush ImageSource="/Image/someImage.png"/>
</Ellipse.Fill>
</Ellipse>
<TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="The Demo Case" Margin="0,60,0,0" Foreground="Green"/>
</Grid>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.