I´m learning the MVVM for WPF. I know how to rout events and split the Code in View, ViewModel, Model. I have in my main-XAML a TabControl and have split the tabs into different views. My Question is, how can i pass an object from one class to another? (From the MainWindow.cs to the SubWindow.cs)
MainWindowRessources XAML:
....
<DataTemplate DataType="{x:Type vm:SubWindow}">
<vw:SubWindow />
</DataTemplate>
<vm:SubWindow x:Key="subView" />
..
MainWindow XAML:
<Window.Resources>
<ResourceDictionary Source="MainWindowResources.xaml" />
</Window.Resources>
...
..
<TabItem>
<ContentControl Content="{StaticResource subView}" />
</TabItem>
...
..