Reputation: 5111
I have two windows:
ListItemWindow
(parent) that contain ocItems as ObservableCollection
DetailItemWindow
I called DetailItemWindow from ListItemWindow (DetailItemWindow.ShowDialog())
From DetailItemWindow How can I access to ocItems ?
Upvotes: 0
Views: 252
Reputation: 3082
Why not pass parent Window in constructor to child Window? It doesn't violate MVVM at all, Views can know each other if they're dependant.
private ListItemWindow parent;
public DetailItemWindow(ListItemWindow window){
this.parent = window;
}
Upvotes: 1