How to access a property of a ViewModel from another ViewModel?

If CommentViewModel and ClientViewModel strongly coupled you can use it direct if the CommentView visual tree has anywhere the datacontext from the ClientViewModel you can use RelativeSource Binding to get there you can use MEF for Export the "Client" property and Import it in the CommentViewModel you can use some sort of Messenger or EventAggregator to communicate from your CommentViewModel to your ClientViewmodel and some more I think :).

Pass reference of ClientViewModel or ClientViewModel. Client to CommentViewModel when creating it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions