In my mainwindow i have a tab control, i need to notify different modules that different tabs has been activated or closed. The tabcontrols SelectedItem is bound to ActiveView in my viewmodel
<TabControl Padding="0" SelectedItem="{Binding ActiveView}"
x:Name="MainViewTab" prism:RegionManager.RegionName="{x:Static inf:RegionNames.MainRegion}"
VerticalAlignment="Stretch"
ItemContainerStyle="{DynamicResource TabHeaderStyle}"
AutomationProperties.AutomationId="MainViewDeatilTab"
/>
In the region Mainregion i load different views
UriQuery parameters = new UriQuery();
parameters.Add("OBJECTID", item.ObjectId.ToString());
regionManager.RequestNavigate(RegionNames.MainRegion,
new Uri("AIT.Modules.SiteEditor.Views.SiteEditor" + parameters.ToString(), UriKind.Relative),
NavigationCompleted);
The selecteditem is bound to property ActiveView and in the property i need to raise an event that contains OBJECTID as a paramenter.
My problem is that the tabcontrols SelectedItem fires before the view has a chance to load the OBJECTID parameter, which i load in Prism OnNavigatedTo . Anyone has an example on how you manage tabcontrols open and close events so other modules can be notified about current views?