You can create a border programmatically in C# code like this:
C#:
var myBorder = new Border
{
HeightRequest = 200,
WidthRequest = 200,
Stroke = Colors.Red,
Padding = new Thickness(10),
Content = new Label { Text = "Hello, Border!" }
};
Content = myBorder;
Share with