Not sure if code in LayoutUpdated is needed