Stack {
layoutInfo: LayoutInfo {
width: bind width;
height: bind height;
}
content: [Rectangle {
width: bind width, height: bind height
//fill: bind color;
fill: Color.GREEN
arcHeight: 20; arcWidth: 20;
}
Text {
font: Font {
size: 24
}
textAlignment: TextAlignment.CENTER;
wrappingWidth: width;
boundsType: TextBoundsType.VISUAL;
fill: Color.WHITE;
content: bind text;
}
]
}
wrappingWidth: Sets the maximun width of the text
boundsType: If you put the wrappingWidth var and you want to center a text you MUST set this var to VISUAL