How to put text into circle in WPF XAML template?

10,402

There are a few ways to do it, like on Centering Text on a WPF Shape

Here's an example:

<Border CornerRadius="50"
        Width="60"
        Height="60"
        Margin="10"
        Padding="0,20,0,0"
        Background="Aquamarine"
        BorderBrush="Black"
        BorderThickness="1">
  <TextBlock HorizontalAlignment="Center">Test
  </TextBlock>
</Border>
Share:
10,402

Related videos on Youtube

Kamilos
Author by

Kamilos

Software developer. Mostly PHP and C#.

Updated on June 04, 2022

Comments

  • Kamilos
    Kamilos about 2 years

    How to put text into circle in WPF XAML template?

Related