The BorderThickness property accepts an integer value to draw a border around the control. The property BorderBrush adds a color to it. You can use SolidColorBrush, GradientColorBrush, or any other brush type. The first Border control adds a thin 2px border around the text.
In the second example, the CornerRadius property has been set to 20 to add a 20-degree curve around the corners of the Border control.
The third example has a border with a background brush to wrap the TextBlock control. You can club both the BorderThickness, BorderBrush, and Background properties together to give such a look. Notice the small corner radius of 5 degrees!
In the fourth example, we have provided a border to two sides of the text. The value of BorderThickness can have 1, 2, or 4 double values. The four doubles (BorderThickness="5, 3, 5, 4" or BorderThickness="5 3 5 4") describes the Left, Top, Right, and Bottom sides in the same order.
When you provide two double values...