Beispiel #1
0
 public CreatePageCommand(PageListViewModel pageListVM, INodeViewModel node, INodeViewModel parent, int indexInParent, TreeView tree)
 {
     _tree          = tree;
     _pageListVM    = pageListVM;
     _node          = node;
     _parent        = parent;
     _indexInParent = indexInParent;
 }
Beispiel #2
0
        public PageListView()
        {
            InitializeComponent();
            _viewmodel       = new PageListViewModel(PageTreeView);
            this.DataContext = _viewmodel;
            this._dragInfo   = new DragInfo();

            base.AddHandler(KeyDownEvent, new KeyEventHandler(PagesFrame_KeyDown), true);
        }
Beispiel #3
0
        public void PerformChange(PageListViewModel pagelistVm)
        {
            if (pagelistVm == null || NodeViewModel == null)
            {
                return;
            }

            var parentNode = Parent == null ? null : Parent.DataContext as NodeViewModel;

            if (!PageListView.IsDescent(NodeViewModel, parentNode))
            {
                pagelistVm.DragTo(
                    NodeViewModel,
                    parentNode,
                    PreviousBrother == null ? null : PreviousBrother.DataContext as NodeViewModel);
            }
        }