public CreatePageCommand(PageListViewModel pageListVM, INodeViewModel node, INodeViewModel parent, int indexInParent, TreeView tree) { _tree = tree; _pageListVM = pageListVM; _node = node; _parent = parent; _indexInParent = indexInParent; }
public PageListView() { InitializeComponent(); _viewmodel = new PageListViewModel(PageTreeView); this.DataContext = _viewmodel; this._dragInfo = new DragInfo(); base.AddHandler(KeyDownEvent, new KeyEventHandler(PagesFrame_KeyDown), true); }
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); } }