Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

updating properties of one viewmodel from another viewmodel

$
0
0

Hi,

I have two forms,in which one form has a listview showing all the alerts(details).If right click the menuitem (UpdateAlert)on the lisviewitem,A new form will be displayed with two two textboxes and with update button,If i click update button,the control will goes to the Updateviewmodel.cs.From the UpdateViewModel,i have to access FirstViewMode's istview property to update the corresponding alert.

Currently i am accessing Listview Property by declaring it as a static.so that the values will available to the UpdateAlertViewModel.

Is there any way to access the FirstViewModel's ListViewProperty values and update a ListviewItem in the UpdateViewModel(chid ViewModel) without declaring property as a static.

Moreover,I have checkbox on the Firstviewmodel which indicates which type of alerts should be dispayed in the istView.I have to know whether the checkbox is checked or not from the UpdateViewModel.cs. To achieve this also i am declaring IsChecked property as static varialbe.

Can anyone please help regarding this issue as it is some urgent requirement.Thanks in Advance.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>