Adding LayoutInvalidator to cause reflows when content or class is changed