UI Toolkit: Resolved style#

UI Toolkit resolves styles asynchronously.
resolvedStyle, layout, contentRect, paddingRect, and others, will return invalid values before it has been initialised.


These members are initialised after an element is created in the hierarchy.
You can use GeometryChangedEvent or AttachToPanelEvent to read from these values when they are valid.

    _ =>
        // _visualElement.resolvedStyle will contain initialised values.