I have a ListView that is a View and this all the properties will assign to the separate ViewModel and I want to assign particular property which is selected from the ListView.
So the ListView bound with ObservableCollection object and SelectedItem also bound with same object so once I select the item and press enter that time I want Selected Item from the ObservableCollection object?
How I can set this value.
Thank you.
I’m not sure I understand your question, but that should probably be handled in the ViewModels.
I would use a messaging system such as MVVM Light’s Messenger or Microsoft Prism’s EventAggregator to broadcast an event which contains the
SelectedItemwhen the Enter key is pressed, and the 2nd ViewModel would subscribe to receive that type of event and could use it’s data to do whatever processing you need