2014-03-19 23 views
1

我想製作一個圓形按鈕並在上面貼上標籤,但是我不能,我試圖製作橢圓形,但我不知道如何在上面製作標籤。 我想做出點正是這樣的形象enter image description here Windows 8的應用程序C#如何繪製一個圓形按鈕並在其上打上標籤

+0

有一個讀http://www.codeproject.com/Articles/5082/Round-Button-in-C –

回答

1

你可以有以下方法試試:

<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> 
2

使用網格,將橢圓,然後在網格中的TextBlock。

<Grid> 
    <Ellipse ... /> 
    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" /> 
</Grid>