Friday, April 13, 2018

UWP:How do you control space between controls in XAML?

The easiest way is use the Margin in your control.

The syntax is Margin="left, top, right, bottom"

The next image shows code and design time layout where all textboxes have some space between them. The Button is still attached to the last textbox.


In this image the textboxes are separated from each other by equal spaces and also the 2,3 and 4 th box are left to their previous ones.

Enjoy!

No comments: