Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
        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);
            }
        }