Ejemplo n.º 1
0
        /// <summary>
        /// Gets the previous focus item based on the current item as provided.
        /// </summary>
        /// <param name="current">The view that is currently focused.</param>
        /// <returns>ViewBase of item; otherwise false.</returns>
        public ViewBase GetPreviousFocusItem(ViewBase current)
        {
            ViewBase view = null;
            ViewLayoutRibbonGroups groups = _viewFiller as ViewLayoutRibbonGroups;

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

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

            return(view);
        }