private static void OnUnloaded(object sender, RoutedEventArgs e)
{
RibbonGallery gallery = (RibbonGallery)sender;
// Invalidate these layout calculations, so that these are recalculated when drop down is opened.
// We would need invalidation if any Items are removed from the parent RibbonMenuButton causing its constraint to change.
gallery.IsArrangeWidthValid = false;
gallery.IsMaxColumnWidthValid = false;
}