示例#1
0
        /// <summary>
        /// Determines whether [is child item selected] [the specified items].
        /// </summary>
        /// <param name="items">
        /// The items.
        /// </param>
        /// <returns>
        /// <c>true</c> if [is child item selected] [the specified items]; otherwise, <c>false</c>.
        /// </returns>
        /// <remarks>
        /// </remarks>
        private bool IsChildItemSelected(MenuItemCollection items)
        {
            var bRet = false;

            if (items != null)
            {
                bRet = items.Cast<MenuItem>().Any(item => item.Selected || this.IsChildItemSelected(item.ChildItems));
            }

            return bRet;
        }