Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: Prism navigation is not working properly with scoped region defined inside a silverlight tab control

$
0
0
<telerik:RadTabControl x:Name="QuoteViewTab"
                       prism:RegionManager.RegionName="QuoteTabRegion" 
                       DropDownDisplayMode="Visible" 
                       VerticalAlignment="Stretch" 
                       Style="{StaticResource TabControlStyle}">

</telerik:RadTabControl>
user can load different quotes in different tabs in this tabcontrol. if selected quote already exist in the tabs then that tab will be selected otherwise new tab will be created be region

QuoteView also implements IConfirmNavigationRequest.
bool INavigationAware.IsNavigationTarget(NavigationContext navigationContext)
{
    if (this.Quote.Id == navigationContext.Parameters["id"])
    {
        return true;
    }
    return false;
}
now when i load different views in main region IsNavigationTarget of TabView is called properly along with nevigated from and nevigated to but when i try to load quotes in tab region all three functions are called first time and after that whatever quote is selected it will show already loaded quote.

thats how i load quoteview in QuoteTabRegion
 _container.RegisterType<object, QuoteView>(typeof(QuoteView).FullName);
 _regionManager.Regions["QuoteTabRegion"].RequestNavigate(new Uri(typeof(QuoteView).FullName + parameters.ToString(), UriKind.Relative));

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>