You can load different sub Module tabs based on a condition. In this example, the condition is based on the module number.
In the Content Window, you can set the ap_SubBrowserLoadID in the RG_SetParentProperties Method:
private void RG_SetParentProperties() { // Call Initialize Component im order to access XAML objects in Code Behind InitializeComponent(); ap_MainDetailType = typeof(UserGroupsDetail); // Visual State Manager _ViewModel = FindResource("UserGroupsViewModel") as UserGroupsViewModel; ap_ViewModel = _ViewModel; ap_DataMaps = new UserGroupsMaps().ap_FieldMaps; if (ModuleNumberToBool.IsCommandGroups(ap_ModuleEntity.ModuleNumber)) { // Change SubBowser ID ap_SubBrowserLoadID = "RFWUGY01_COMMANDS"; } }
In the Detail, you can override the method am_CreateSubBrowsers() and set the ap_SubrowserLoadID:
protected override void am_CreateSubBrowsers() { if (ModuleNumberToBool.IsCommandGroups(ap_ModuleEntity.ModuleNumber)) { // Change SubBowser ID ap_SubBrowserLoadID = "FFWUGD01_COMMANDS"; } base.am_CreateSubBrowsers(); }