Uses depth within tree to set the depth index of text controls and their renderers.