internal void InvalidateMeasureOnAllCategoriesPanel()
{
if (Items != null)
{
for (int i = 0; i < Items.Count; i++)
{
RibbonGalleryCategory category = (RibbonGalleryCategory)ItemContainerGenerator.ContainerFromIndex(i);
if (category != null)
{
if (category.ItemsHostSite != null)
{
TreeHelper.InvalidateMeasureForVisualAncestorPath<RibbonGallery>(category.ItemsHostSite, false);
}
}
}
}
}