I have an application like the one below (i know the colors are awful, I just made it this way to make it easier to explain):
It has 3 views and 3 viewmodels. A mainview(the gray one) which contains a content control which will change the view depending on which button is clicked, the homeview(the green one) which lets the user pick a file, and the blue one which is supposed to read out the contets of the file
MainView with FileView
The button for selecting the file is implemented in the codebehind of the homeview, it's just a simple openfiledialog, what I need is to pass the result of the openfiledialog from the homeview's (green one) code behind to the file's view (the blue one) or maybe to the FileViewModel (not sure which one is more appropriate here) so that it can show the contents of the file in the blue view. What I was trying to do was to call a command to try to communicate between these two views and pass the file path between them but i'm not sure if this is the appropriate approach.