Example #1
0
        public NavigationNode(NavigationNodeFactory factory)
        {
            myFactory = factory;

            Children = new ObservableCollection <NavigationNode>();
            RegisterChangeHandler();
        }
Example #2
0
        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();
        }