public NavigationNode(NavigationNodeFactory factory) { myFactory = factory; Children = new ObservableCollection <NavigationNode>(); RegisterChangeHandler(); }
public DocumentNavigationPane() { myNodeFactory = new NavigationNodeFactory(OnSelectionChanged); Root = new NavigationNode(myNodeFactory); CreateChildCommand = new DelegateCommand <NavigationNode>(OnCreateChild); DeleteCommand = new DelegateCommand <NavigationNode>(n => ((NavigationNode)n.Parent).Children.Remove(n)); var dragDropBehavior = new DragDropBehavior(Root); DropCommand = new DelegateCommand <NodeDropRequest>(dragDropBehavior.ApplyDrop); InitializeComponent(); }