Text Alignment Isssue

I created a page to monitor my Hubitat Door status. In the designer I have the text boxes on top of rectangles. The rectangles are set to change color when the door opens or closes. That works fine. The text boxes in the designer are configure with 2 or 3 lines of text. But when I look at it in my phone the text is all on one line. I have checked the xaml file and the CR’s and LF’s are there. Any ideas as to why it is different?

For multiline text, you’ll need to make sure the TextWrapping property is set to Wrap

Are you using a TextBox or Label control? The TextBox is meant for input entry & changes to a field. If you are simply displaying your garage door status you should probably use a Label.

I’m using a label on top of a rectangle. I turned the wrap on and that kinda worked. But if the text is too long it doesn’t all show up. I guess my main point is it doesn’t look the same on the designer as it does on the device.

Is there some other control I should be using to do this? Since I just want to see door status as a color change I picked the rectangle and set it up to change the fill color. That works great. But I did need to label each one.

There are going to be some differences. The simulator is a Windows Desktop app designed to look like the Android & iOS apps. The apps themselves actually use the controls native to the platform. The simulator was designed to look & behave as close as possible to the actual apps but it’s not going to be an exact match.

That depends. The Label itself has Background property so you could just do this all with 1 control instead of 2. Or if you want to keep the size small but still have the option to view all of the Text, place the Label inside of a ScrollViewer.