public static void DeselectItem(IntPtr controlHandle, string itemText)
        {
            try
            {
                AutomationElement control      = CommonUIAPatternHelpers.Prologue(SelectionPattern.Pattern, controlHandle);
                AutomationElement itemToSelect = SelectionItemPatternHelper.FindItemByText(control, itemText);

                StaticEvents.RegisterEvent(SelectionItemPattern.ElementRemovedFromSelectionEvent, control);
                SelectionItemPatternHelper.RemoveFromSelection(itemToSelect);

                LogController.ReceiveLogMessage(new LogMessage("List Item deselected: " + itemText));
            }
            catch (InvalidOperationException)
            {
                /* Call native function */
                ProdListBoxNative.DeSelectItemNative(controlHandle, itemText);
            }
            catch (ElementNotAvailableException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
            catch (ArgumentException err)
            {
                throw new ProdOperationException(err.Message, err);
            }
        }
 private static void NativeRemoveFromSelection(BaseProdControl control, string itemText)
 {
     ProdListBoxNative.DeSelectItemNative((IntPtr)control.UIAElement.Current.NativeWindowHandle, itemText);
 }