From the course: .NET 9 Maui: Enhanced Features for Cross-Platform Development

Unlock this course with a free trial

Join today to access over 24,400 courses taught by industry experts.

Text justification

Text justification

- [Instructor] The new type of horizontal alignment has been added to the label view. The type is called justify and it is primarily for labels that span multiple lines. The justify alignment option is not the same as center. That is to say, it does not center the text in the label, instead what it does is make the letters and words stretch out so that it reaches the far left and right usable boundaries of the view. If there is less than one line of text it appears to work the same as setting the value to left. We're going to go in and add a label to the user information screen that spans several lines. So I'm going to do that right before the button here. We'll go in and go label. And we'll set that to grid row of eight and we'll set it as a column span of two. And we've get text here. I'll paste in the text and that will give us enough text to span multiple lines. And now we're going to run it and see what is looks like with just standard alignment. Okay, here's the app running…

Contents