Пример #1
0
        public MainForm(IMainFormViewModel viewModel, ILogViewerControlFactory logViewerFactory)
        {
            DataContext = viewModel;

            XamlReader.Load(this);

            OptionsPanel.Content = logViewerFactory.GetOptionsPanel();
        }
Пример #2
0
        public OptionsPanel(IOptionsPanelViewModel viewModel, ILogViewerControlFactory logViewerFactory)
        {
            DataContext = viewModel;

            XamlReader.Load(this);

            LogViewerControlPanel.Content = logViewerFactory.GetDocumentContainerPanel();
        }
Пример #3
0
        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;
        }