Topic : Layout Attribute - Spacing:

Spacing:

Spacing is a Value in Device Pixels which indicates the amount of space between each child element.



XML Syntax:

If We want to add some space between the views in Stack Layout , then we will use the following syntax to add some space.


<StackLayout Spacing="20" >


By default, Stack Layout will add a 6px margin between views. We can set to have no margin or margin other than 6px by setting Spacing Property on Stack Layout. The Following Example show, how we can set no margin using spacing property.


<StackLayout Spacing="0" >


Layout Without spacing: infobrother

Now let's add some space in same example and check out the difference.


<StackLayout Spacing="20" >


Layout Using space: infobrother

















I Tried my Best to Provide you complete Information regarding this topic in very easy and conceptual way. but still if you have any Problem to understand this topic, or do you have any Questions, Feel Free to Ask Question. i'll do my best to Provide you what you need.

Sardar Omar.
InfoBrother





WRITE FOR INFOBROTHER

Advertising






Advertisement