private void DisplayResults(TestedGroup testedGroup) { if (MainScreenContent.GetType() != typeof(PresentationScreenControl)) { MainScreenContent = new PresentationScreenControl(new PresentationScreenViewModel()); } var mainContentViewModel = (PresentationScreenViewModel)MainScreenContent.DataContext; mainContentViewModel.ContentPresented = testedGroup.AsResultsControl(); mainContentViewModel.PerentViewModel = this; mainContentViewModel.HasResultsShown = true; }
public MainWindowViewModel() { //Inicjalizacja komend ExpandMenuCommand = new RelayCommand(AnimateMenu); GetDataFromFileCommand = new RelayCommand(GetDataFromFile); EvaluateSelectedFilesCommand = new RelayCommand(EvaluateSelectedFiles); var viewmodel = new PresentationScreenViewModel { Title = "Tu pojawiÄ… siÄ™ obliczone wyniki", ContentPresented = new PlaceHolderControl(), PerentViewModel = this }; MainScreenContent = new PresentationScreenControl(viewmodel); LoadSavedFile(SavedFilesPath); }