如何实现treeView的节点单击事件
是节点单击事件,不是选择事件,请给个思路或代码。多谢!
补充,我曾用过
treeViewTemp.MouseLeftButtonUp += new MouseButtonEventHandler(treeViewTemp_MouseLeftButtonUp);private void treeViewTemp_MouseLeftButtonUp(object sender, MouseButtonEventArgs e){MessageBox.Show("信息!");}
RadTreeViewItem selectedItem = null;//选中时动态绑定 private void RadTreeView1_Selected(object sender, Telerik.Windows.RadRoutedEventArgs e){ RadTreeView source = sender as RadTreeView; selectedItem = source.SelectedItem as RadTreeViewItem; if (!selectedItem.HasItems) { getTreeSoapClient client = new getTreeSoapClient(); //实时险情列表 client.getSSQXListCompleted += new EventHandler<getSSQXListCompletedEventArgs>(client_getSSQXListCompleted); client.getSSQXListAsync(selectedItem.Header.ToString().Trim()); }}