private void OnRootMeasured(object sender, EventArgs e)
{
// If the root visual gets measured, there is a good chance we may
// need to be remeasured too. But since we are not connected
// visually, we need to propagate this manually.
//
// Note: sometimes we cause the measure ourselves, so there is no
// need to propagate this back.
InvalidateMeasure();
}