简体   繁体   中英

How to Draw a circle button and make label over it

I want to make a circle button and label over it but I cant , I tried to make ellipse but I don't know how to make a label over it. I want to make something exactly like this image 在此输入图像描述 Windows 8 Apps C#

Use a Grid, place the Ellipse followed by the TextBlock in the Grid.

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

You can have a try on following method:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM