Relative Content

Tag Archive for c#wpfmvvm

C# WPF MVVM changing CurrentView via UserControl

I’m creating a c# WPF MVVM application where there is a MainWindow(MainView) that has a ContentControl bound to the CurrentView(property). There is a UserControl Test that is initially installed in CurrentView, it starts a test and runs a timer, at the end of it I want to change CurrentView to TestResults with data transfer, but unfortunately I have no idea how to do this, so I would like to know what are the possible solutions?

How to change the main view through some VM?

I’m creating a c# WPF MVVM application, let’s assume there is a MainWindow which has a MainVM and a MainView where a ContentControl is installed that displays one of the views. There is TestVM which is displayed by default and where there is a test, I need that at the end of the 60 second timer (the timer is started in TestVM) in MainView ContentControl changes the view to TestResultsVM. But I don’t know how to do this, I tried through events, but I’m new to working with them and it didn’t work. MainVM has a CurrentView property that sets the current view in the window. You need to change it somehow, but I don’t know how 🙁

c# WPF MVVM how to change the main view through some VM?

I’m creating a c# WPF MVVM application, let’s assume there is a MainWindow which has a MainVM and a MainView where a ContentControl is installed that displays one of the views. There is TestVM which is displayed by default and where there is a test, I need that at the end of the 60 second timer (the timer is started in TestVM) in MainView ContentControl changes the view to TestResultsVM. But I don’t know how to do this, I tried through events, but I’m new to working with them and it didn’t work. MainVM has a CurrentView property that sets the current view in the window. You need to change it somehow, but I don’t know how 🙁

WPF Custom combobox

I am using a custom WPF combobox which contains checkboxes. I want following functionalities in the combobox.