How to implement an elastic view in a data field based on the position configured

Hi, for a ConnectIQ datafield, it can be configured at any position in a layout of its data screen.

In order to make adaption for different layouts, how to know metrics like height and width of a position?