Beispiel #1
0
        void UpdateCurrentGroupSize()
        {
            var gsd = GroupSizeDefinitions;

            if (gsd == null || gsd.Count == 0)
            {
                mCurrentGroupSizeDefinition = null;
            }
            else
            {
                var iGS = IsCollapsed ? 0 : GroupSizeIndex;
                iGS = iGS < 0 ? 0 : iGS >= gsd.Count ? gsd.Count - 1 : iGS;
                mCurrentGroupSizeDefinition = gsd[iGS];

                int iItem = 0;
                for (int i = 0; i + iItem < Items.Count && i < mCurrentGroupSizeDefinition.ControlSizeDefinitions.Count; i++)
                {
                    while (i + iItem < Items.Count)
                    {
                        var ic = Items[i + iItem] as IRibbonGroupControl;
                        if (ic != null)
                        {
                            ic.ControlSizeDefinition = mCurrentGroupSizeDefinition.ControlSizeDefinitions[i];
                            break;
                        }
                        else
                        {
                            iItem++;
                        }
                    }
                }
            }
        }
Beispiel #2
0
 void OnIsCollapsedChanged(bool OldValue, bool NewValue)
 {
     mCurrentGroupSizeDefinition = null;
 }