public ControlVM(IBookmarksVM vm, BookmarksOperations operations, IMessageBoxService messageBoxService, DependencyObject control) { VM = vm; Operations = operations; this.messageBoxService = messageBoxService; this.control = control; }
BookmarksContent(IWpfCommandService wpfCommandService, IBookmarksVM bookmarksVM, BookmarksOperations bookmarksOperations, IMessageBoxService messageBoxService) { Operations = bookmarksOperations; bookmarksControl = new BookmarksControl(); this.bookmarksVM = bookmarksVM; bookmarksControl.DataContext = new ControlVM(bookmarksVM, bookmarksOperations, messageBoxService, bookmarksControl); bookmarksControl.BookmarksListViewDoubleClick += BookmarksControl_BookmarksListViewDoubleClick; wpfCommandService.Add(ControlConstants.GUID_BOOKMARKS_CONTROL, bookmarksControl); wpfCommandService.Add(ControlConstants.GUID_BOOKMARKS_LISTVIEW, bookmarksControl.ListView); bookmarksControl.ListView.PreviewKeyDown += ListView_PreviewKeyDown; }
public BookmarksCtxMenuContext(BookmarksOperations operations) => Operations = operations;