public void DisplaySetupView(DisplayPreviewModuleDataModel dataModel) { var setupViewModel = new SetupViewModel(dataModel); var setupView = new SetupView { DataContext = setupViewModel }; setupView.ShowDialog(); StartVisualizer(dataModel); //Refresh the visualizer }
public void DisplaySetupView(DisplayPreviewModuleDataModel dataModel) { var setupViewModel = new SetupViewModel(dataModel); var setupView = new SetupView {DataContext = setupViewModel}; setupView.ShowDialog(); if (_view != null) { //Ensure current view is using this datamodel _visualizerViewModel = new VisualizerViewModel(dataModel.Clone() as DisplayPreviewModuleDataModel); _view.DataContext = _visualizerViewModel; _view.Focus(); } }