Ask Your Question
0

How do you code using the Border control with rounded edges in dotnet Maui using C# language?

asked 2022-01-12 11:00:00 +0000

pufferfish gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2022-09-08 07:00:00 +0000

qstack gravatar image

In dotnet Maui, you can create a Border control with rounded edges using the following C# code:

# var border = new Border { CornerRadius = new CornerRadius(16), // set the corner radius BorderThickness = new Thickness(2), // set the border thickness BorderColor = Color.Black, // set the border color Content = new Label // add content to the border { Text = "Hello, world!", FontSize = 20, FontAttributes = FontAttributes.Bold } };

In this example, we create a new Border control and set its CornerRadius property to 16 to give it rounded edges. We also set the BorderThickness and BorderColor properties to control the appearance of the border. Finally, we add a Label control as the content of the Border.

You can customize the values of these properties to suit your needs and add additional controls as the content of the Border.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-01-12 11:00:00 +0000

Seen: 12 times

Last updated: Sep 08 '22