Panels
Understand panels in the visual tree.
Read time 1 minuteLast updated 22 days ago
The panel is the parent object of a visual tree. It owns the but itself isn't a visual element. A visual tree must connect to a panel for the visual elements inside a tree to render. All panels belong to either an Editor Window or a runtime UIDocument. The panel also handles focus control and event dispatching for the visual tree.
rootVisualElementEvery element in a visual tree holds a direct reference to the panel that holds the visual tree. To verify the connection of a to a panel, you can test the property of this element. When the visual element isn't connected, the test returns .
VisualElementpanelnull