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

New Post: View Base Navigation Not taking place.

$
0
0
Hi to all friends out there.

I am not able to acheive iew base navigation . In my application i have to change view in region and this i need to achieve with navigation.

Below is my code.

public class StartUpScreenViewModel : IRegionMemberLifetime
{
    public IUnityContainer appContainer ;
    public IRegionManager appRegionMngr ;
    public bool KeepAlive
    {
        get { return true; }
    }

    public StartUpScreenViewModel()
    {
        appContainer = ServiceLocator.Current.GetInstance<IUnityContainer>();
        appRegionMngr = ServiceLocator.Current.GetInstance<IRegionManager>();
        registerViews();
    }

    private void registerViews()
    {

        appContainer.RegisterType<object, Register>("register");
        appContainer.RegisterType<object, AuthenticatedUser>("Authenticated");
        appContainer.RegisterType<object, Authenticate>("Authenticate");
        appContainer.RegisterType<object, StartUpScreen>("StartUpScreen");
    }
}
and on linkbutton i bind this delegate having this method.

regionmngr.RequestNavigate("mainRegion", new Uri("register", UriKind.Relative));

whenever i click on button, view do not changes. It remain same. Even i checked with callback method of navigation but there is no error and nothing.

So can you please tell me what i am doing wrong which is not letting my view to change.I need to show one view at time.

Thanks in advance.

Viewing all articles
Browse latest Browse all 1878

Trending Articles



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