public static ExtendedTreeViewItem GetContainerFromItem(this ExtendedTreeView treeView, object item) { return((from p in treeView.GetItemContainers() where p.DataContext == item select p).FirstOrDefault()); }
public static void ForEachTreeViewItem(this ExtendedTreeView treeView, Action <ExtendedTreeViewItem> action) { treeView.GetItemContainers().ForEach(action); }