Ejemplo n.º 1
0
        /// <summary>
        /// Gets the array of group level key tips.
        /// </summary>
        /// <returns>Array of KeyTipInfo; otherwise null.</returns>
        public KeyTipInfo[] GetGroupKeyTips()
        {
            ViewLayoutRibbonGroups groups = _viewFiller as ViewLayoutRibbonGroups;

            // If we contain a groups layout
            if (groups != null)
            {
                KeyTipInfoList keyTips = new KeyTipInfoList();

                // Grab the list of key tips for all groups
                keyTips.AddRange(groups.GetGroupKeyTips());

                // Remove all those that do not intercept the view rectangle
                for (int i = 0; i < keyTips.Count; i++)
                {
                    if (!_viewClipRect.Contains(keyTips[i].ClientRect))
                    {
                        keyTips[i].Visible = false;
                    }
                }

                return(keyTips.ToArray());
            }
            else
            {
                return new KeyTipInfo[] { }
            };
        }