Margin setter with different values for left, top, right and bottom

I have template configured which displays text. For the textblock component alignment property is binded to show text at various position in the rectangle i.e Top Left, Top Center, Top Right, Middle Left, Middle Center, Middle Right, Bottom Left, Bottom Right and Bottom Center etc.

At the same time, my rectangle contains some small image internally (Like in BPMN User Task, Manual Task etc) shown in top left corner.

I also provided the margin property which is binded for textblock object.
What happens now is when alignment is set to “TopLeft” it gets overlaps with the image. Setting margin moves the text in diagnoal direction. What I need to specify is only margin for Left or Top.

Also note that, the alignement, margin properties are binded and configured through another UI. So when user specifies margin “10,5,10,10” it is taking 10 for all sides …

Gone through API help, and according to it setter always accept a number. Can this be fixed in next release ?

Well, it seems working. The values which i am specifing are with comma separated.
When binded they gets displayed in the model without comma.

But when i tried values instead of comma with space, it seems working.

That’s correct – the syntax for Margin is determined by the Margin.stringify static function. So Margin.parse must follow that convention. The same goes for the other geometric types: Point, Size, Rect, and Spot.

FYI, the syntax is locale-independent: we wanted to avoid dealing with punctuation such as commas potentially being used as the decimal point.