C
C#4mo ago
Mustafa

My views are not connected

In my application's main page, I am calling different views. Two views that are displayed side by side should interact with each other. When I add a task, it should appear in the ListView in the other view. Also, when I select a task from the ListView, the details of the selected task should be visible in the editors so that I can edit them. I have connected both views to the same ViewModel in their respective classes, but they are not working synchronously. When I add a task, I need to close and reopen the application to see it in the ListView of the other view. How can I fix this?
3 Replies
Casianm8
Casianm84mo ago
Hey - You need to ensure that both VIEW windows (be it a Window or a UserControl) have the same datacontext . - Make sure that you have implemented INotifyPropertyChanged to ensure that any data changes automatically update the UI. @Mustafa
Mustafa
MustafaOP4mo ago
I'm sorry I didn't see it i solved my problem thanks anyway
Casianm8
Casianm84mo ago
✌️ If you need help with other problems, I can help you
Want results from more Discord servers?
Add your server