public MainForm(IMainFormViewModel viewModel, ILogViewerControlFactory logViewerFactory) { DataContext = viewModel; XamlReader.Load(this); OptionsPanel.Content = logViewerFactory.GetOptionsPanel(); }
public OptionsPanel(IOptionsPanelViewModel viewModel, ILogViewerControlFactory logViewerFactory) { DataContext = viewModel; XamlReader.Load(this); LogViewerControlPanel.Content = logViewerFactory.GetDocumentContainerPanel(); }
public DocumentContainerPanel(IDocumentContainerPanelViewModel viewModel, ILogViewerControlFactory logViewerControlFactory) { DataContext = viewModel; XamlReader.Load(this); ViewModel.InvalidatePages += ViewModel_InvalidatePages; ViewModel.FollowChanged += ViewModel_FollowChanged; _logViewerControlFactory = logViewerControlFactory; this.DragDrop += DocumentContainerPanel_DragDrop; this.DragEnter += DocumentContainerPanel_DragEnter; this.AllowDrop = true; DocumentCtrl.AllowReordering = true; DocumentCtrl.PageClosed += DocumentCtrl_PageClosed; DocumentCtrl.Bindings.Add(new DualBinding <LogViewerGrid>(DocumentCtrl, nameof(DocumentCtrl.SelectedPage), ViewModel, nameof(ViewModel.SelectedPage))); DocumentCtrl.SelectedIndexChanged += DocumentCtrl_SelectedIndexChanged; }