Write text inside shapes using Border control in wpf

We know that WPF Shapes (such as ellipse,rectangle etc) are not container control, so we can put some text directly inside them or we will have to work extra for doing that but we can do this with the help of Border control very easily. I am trying to show this with the following example:

Write text on the shape in WPF

[XAML]

<Window x:Class="Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="258" Width="580">
    <Grid>
        <Border CornerRadius="80" Background="#ffffff" BorderBrush="#2a3b57" 
                BorderThickness="5" Height="77" Margin="164,39,218,0" 
                Name="Border1" VerticalAlignment="Top" >
            <TextBlock Background="#ffffff" HorizontalAlignment="Center"
                       VerticalAlignment="Center" Height="34" Width="69"
                       TextWrapping="Wrap">
                Welcome to AuthorCode
            </TextBlock>
        </Border>
    </Grid>
</Window>

In the following example we are using CornerRadius property of the Border, you can set this property as you wish. Suppose if you want to show text in rectangle, just remove the property or if you want to show text inside Rounded rectangle then you can set CornerRadius property to 20 or 30 as your requirement.
We are using HorizontalAlignment=”Center” and VerticalAlignment=”Center” properties of TextBlock for centering text in the shape.