private void UpdateChildSizes() { var groupBoxState = this.State == RibbonGroupBoxState.QuickAccess ? RibbonGroupBoxState.Collapsed : this.State; foreach (var item in this.Items) { var element = this.ItemContainerGenerator.ContainerFromItem(item); if (element is null) { continue; } var targetElement = element; if (targetElement is ContentPresenter) { targetElement = UIHelper.GetFirstVisualChild(targetElement) ?? targetElement; } RibbonProperties.SetAppropriateSize(targetElement, groupBoxState); } }
private void UpdateChildSizes() { var groupBoxState = this.State == RibbonGroupBoxState.QuickAccess ? RibbonGroupBoxState.Collapsed : this.State; foreach (var item in this.Items) { var element = this.ItemContainerGenerator.ContainerFromItem(item); RibbonProperties.SetAppropriateSize(element, groupBoxState); } }