Reputation: 890
I'm using the NativeScript StackLayout component to layout my elements.
What is the best approach to create a gap between the child elements of a StackLayout?
Upvotes: 3
Views: 3105
Reputation: 8321
You can use margin
in the css for that layout.
In you XML:
<StackLayout>
<Label text="Hey there,"></Label>
<Label text="world!"></Label>
</StackLayout>
In your css:
StackLayout Label {
margin: 10;
}
Upvotes: 7