Remove a page from Navigation Stack

前端 未结 6 1430
暖寄归人
暖寄归人 2021-01-11 11:05

I have this application schema :

[List Page] -> [Detail Page] -> [ShareOnFacebook Page]
                     ^__________________|
    <
6条回答
  •  隐瞒了意图╮
    2021-01-11 11:11

    Have a look at simple library i wrote for such purposes: http://navcoerce.codeplex.com/

    var fluent = new FluentNavigation(RootFrame);                          
    
    fluent.WhenNavigatedTo()                                     
          .ThenTo()                                             
          .ThenToAnyPage()                                                 
          .RemoveEntriesFromBackStack(1);                                  
    
    fluent.WhenNavigatedTo()                                     
          .ThenTo()                                             
          .ThenTo()                                          
          .ThenTo()                                           
          .RemoveEntriesFromBackStackTill();                     
    
    fluent.WhenNavigatedTo()                                     
          .ThenTo()                                            
          .ThenTo()                                          
          .ThenOptionallyTo()                          
          .ThenToAnyPage()                                                 
          .RemoveEntriesFromBackStackTill();                     
    
    fluent.WhenNavigatingTo()                                 
          .RedirectTo();                                        
    
    fluent.WhenNavigatingTo()                                 
          .If(() => false)                                                 
          .RedirectWithReturnUri("ReturnUri");   
    

提交回复
热议问题