Hi Wanlop,
Please refer to the code example below in which we have shown how to get the size of the text.
Code example:
TextNode TextNode = new TextNode();
TextNode.Name = "TextNode";
TextNode.OffsetX = 100;
TextNode.OffsetY = 100;
TextNode.Height = 100;
TextNode.Width = 100;
//Set the text node properties
TextNode.TextBlock.Text = "Text Node";
model.Nodes.Add(TextNode);
//to get the size of the text
$('span#TextNode')[0].getBoundingClientRect()
Note: $('span#TextNode')[0], Here TextNode is a node name.
Regards,
Shyam G