Inheritance: ToggleButtonAutomationPeer, ISelectionItemProvider
        private void Test()
        {
            RadioButtonAutomationPeer RBAutomationPeer = new RadioButtonAutomationPeer(this.RB);

            ISelectionItemProvider SelectProvider = SelectProvider = (ISelectionItemProvider)RBAutomationPeer.GetPattern(PatternInterface.SelectionItem);
            SelectProvider.Select();
        }
        public AutomationDelegatingListViewItemAutomationPeer(AutomationDelegatingListViewItem listViewItem)
            : base(listViewItem) 
        {
            checkBoxItem = this.GetChildren().OfType<CheckBoxAutomationPeer>().SingleOrDefault();
            if (checkBoxItem != null)
            {
                var toggleButton = ((CheckBox)checkBoxItem.Owner);
                toggleButton.Checked += Checkbox_CheckChanged;
                toggleButton.Unchecked += Checkbox_CheckChanged;
                return;
            }

            radioButtonItem = this.GetChildren().OfType<RadioButtonAutomationPeer>().SingleOrDefault();
            if (radioButtonItem != null)
            {
                var toggleButton = ((RadioButton)radioButtonItem.Owner);
                toggleButton.Checked +=   RadioButton_CheckChanged;
                toggleButton.Unchecked += RadioButton_CheckChanged;
                return;
            }

            textBlockItem = this.GetChildren().OfType<TextBlockAutomationPeer>().FirstOrDefault();
        }