在我的主窗口中我有一个选项卡控件,我需要通知不同的模块,不同的选项卡已被激活或关闭。该的TabControls的SelectedItem必将有效收视在我的视图模型棱镜请求导航
<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"
/>
在区域Mainregion我加载不同的看法
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);
的selectedItem属性绑定到财产的ActiveView和财产我需要提高的事件包含OBJECTID作为参数。
我的问题是在视图有机会加载OBJECTID参数(我在Prism OnNavigatedTo中加载)之前触发tabcontrols SelectedItem。任何人都有关于如何管理tabcontrols打开和关闭事件的例子,以便其他模块可以通知当前视图?
谢谢我以另一种方式解决它,但你的似乎更好。没有意识到NavigatonService – klashagelqvist 2012-03-11 10:57:03