Exemplo n.º 1
0
        private void treeViewItem_Selected(object sender, RoutedEventArgs e)
        {
            var treeView = (System.Windows.Controls.TreeView)e.Source;

            CustomTreeViewItem selectedItem = (CustomTreeViewItem)treeView.SelectedItem;

            if (OnSelectionChange != null)
            {
                OnSelectionChange(this, new CustomTreeViewEventArgs(selectedItem));
            }
        }
Exemplo n.º 2
0
        //AddFilesToFolder_Click
        private void AddToGroup_Click(object sender, RoutedEventArgs e)
        {
            var id = (int)((MenuItem)e.Source).Tag;


            CustomTreeViewItem selectedItem = _items.Where(p => p.ID == id).FirstOrDefault();

            if (OnAddToGroup != null)
            {
                OnAddToGroup(this, new CustomTreeViewEventArgs(selectedItem));
            }
        }
Exemplo n.º 3
0
 public CustomTreeViewEventArgs(CustomTreeViewItem item)
 {
     _Item = item;
 }