コード例 #1
0
        IRawElementProviderSimple[] ISelectionProvider.GetSelection()
        {
            List <IRawElementProviderSimple> list = new List <IRawElementProviderSimple>();

            TreeViewEx treeView = (TreeViewEx)Owner;

            foreach (var item in treeView.GetTreeViewItemsFor(treeView.SelectedItems))
            {
                list.Add(new TreeViewExItemAutomationPeer(item, this));
            }

            return(list.ToArray());
        }