Prism RequestNavigate does not work

后端 未结 3 994
一生所求
一生所求 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:46

    This is your problem:

    bool INavigationAware.IsNavigationTarget(NavigationContext navigationContext) => true;
    

    If you want a new view to be created and added to your region each time you call RequestNavigate(), IsNavigationTarget() must return false instead of true.

提交回复
热议问题