Ejemplo n.º 1
0
        /// <summary>
        /// Gets the first focus item within the scroll port.
        /// </summary>
        /// <returns>ViewBase of item; otherwise false.</returns>
        public ViewBase GetFirstFocusItem()
        {
            ViewBase view = null;
            ViewLayoutRibbonGroups groups = _viewFiller as ViewLayoutRibbonGroups;

            // If we contain a groups layout
            if (groups != null)
            {
                // Ask the groups for the first focus item
                view = groups.GetFirstFocusItem();

                // Make sure client area of view is visible
                if (view != null)
                {
                    ScrollIntoView(view.ClientRectangle, true);
                }
            }

            return(view);
        }