C# 如何绘制圆形按钮并在其上制作标签
我想做一个圆形按钮和标签,但我不能,我试图使椭圆,但我不知道如何使标签在它。 我想做一些和这张照片一模一样的东西C# 如何绘制圆形按钮并在其上制作标签,c#,.net,windows,windows-store-apps,C#,.net,Windows,Windows Store Apps,我想做一个圆形按钮和标签,但我不能,我试图使椭圆,但我不知道如何使标签在它。 我想做一些和这张照片一模一样的东西 Windows 8应用程序C#使用网格,将椭圆后跟文本块放置在网格中 <Grid> <Ellipse ... /> <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" /> </Grid> 您可以尝试以下方法: <Grid>
Windows 8应用程序C#使用网格,将椭圆后跟文本块放置在网格中
<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>
阅读