/// <summary>
        /// Gets the number of child tabs contained in the tab control
        /// </summary>
        /// <param name="controlHandle">The target controls handle.</param>
        /// <returns>
        /// The number of tabs in a TabControl
        /// </returns>
        /// <exception cref="ProdOperationException">Examine inner exception</exception>
        public static int TabGetCount(IntPtr controlHandle)
        {
            try
            {
                AutomationElement control = CommonUIAPatternHelpers.Prologue(SelectionPattern.Pattern, controlHandle);
                int retVal = SelectionItemPatternHelper.GetListItemCount(control);

                if (retVal == -1)
                {
                    ProdTabNative.GetTabCount(controlHandle);
                }
                LogController.ReceiveLogMessage(new LogMessage(retVal.ToString(CultureInfo.CurrentCulture)));
                return(retVal);
            }
            catch (InvalidOperationException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
            catch (ElementNotAvailableException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
            catch (ArgumentException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
        }
        public static int GetItemCount(IntPtr controlHandle)
        {
            try
            {
                AutomationElement control = CommonUIAPatternHelpers.Prologue(SelectionPattern.Pattern, controlHandle);
                int ret = SelectionItemPatternHelper.GetListItemCount(control);

                if (ret == -1)
                {
                    if (control.Current.ControlType == ControlType.ComboBox)
                    {
                        ProdComboBoxNative.GetItemCountNative(controlHandle);
                    }
                    else
                    {
                        ProdListBoxNative.GetItemCountNative(controlHandle);
                    }
                }

                LogController.ReceiveLogMessage(new LogMessage(ret.ToString(CultureInfo.InvariantCulture)));
                return(ret);
            }
            catch (InvalidOperationException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
            catch (ElementNotAvailableException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
            catch (ArgumentException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
        }