Hy guys!
I am currently working on a little WPF project using MVVM via the Onyx framework.
My currentview architecture is like this:
<DockPanel>
<Menu DockPanel.Dock="Top" Background="#cecece">
<!-- Menu -->
</Menu>
<Grid>
<views:TranslationView x:Name="translationView" />
</Grid>
</DockPanel>
The question that I now have is how to implement the relationship between the two viewmodels. I currently basically just have the TranslationView have its own ViewModel with no link to the parent ViewModel.
The problem is that I want to be able to open some file via the MainView and then parse the contents and display them in the TranslationView. Is there a recommended way to do this?
I thought about just using the TranslationViewModel as a property in the MainViewModel and then using it as DataContext for the TranslationView but it kinda seems to run against Onyx's model to define the ViewModel through a type (not a object) reference.