Prism RequestNavigate does not work

后端 未结 3 965
一生所求
一生所求 2021-01-02 18:40

In each view

public partial class View2 : UserControl, IRegionMemberLifetime, INavigationAware
{

  public bool KeepAlive
  {
    get { return false; }
  }

         


        
3条回答
  •  一整个雨季
    2021-01-02 18:41

    I have seen that if I implement IConfirmNavigateRequest and do not call continutationCallback(true), the navigation fails quietly.

    public void ConfirmNavigationRequest(NavigationContext navigationContext, Action continuationCallback)
        {
            //***Should have actual logic here
            continuationCallback(true);
        }
    

    While this may not be your case, I figured this out by debugging through the Prism code. I would suggest you do this to figure out your issue. Delete the references to the following in each relevant project.

    • Microsoft.Practices.Prism
    • Microsoft.Practices.Prism.Interactivity
    • Microsoft.Practices.Prism.MefExtensions
    • Microsoft.Practices.Prism.UnityExtensions

    Then add the projects from the PrismLibrary DeskTop, Silverlight or Phone directory (where you installed PRISM). Then reference these projects.

提交回复
热议问题