// The Panel is not ready during ApplyTemplate of the RibbonGallerryCategory, so it should be queried at later time. private void OnItemContainerGeneratorStatusChanged(object sender, EventArgs e) { if (ItemContainerGenerator.Status == GeneratorStatus.ContainersGenerated) { SynchronizeWithCurrentItem(); if (_itemsPresenter != null) { ItemsHostSite = (Panel)(ItemsPanel.FindName(RibbonGalleryCategory.ItemsHostPanelName, _itemsPresenter)); } } }