Multiple AppBar/CommandBar's

前端 未结 3 914
借酒劲吻你
借酒劲吻你 2020-12-10 09:05

Back in Windows Phone 8, I was able to to use multiple AppBar, swapping them on certain pivot pages but In Windows Phone 8.1, I\'m not sure how to do this or is this even po

3条回答
  •  一生所求
    2020-12-10 09:44

    I ended with creating my base page class (actually I already had I for passing navigation parameter to ViewModel) that extends original Page. In Base Page I added Dependency Property AppBarCollection so that I could use it in my real pages in Xaml. And there I define all necessary AppBars without necessity of creating them in code behind. The only thing I do there is choosing which one to show. Even this can be done from Xaml, but I didn't want to make things more complex. The option is basically the first suggestion, with the difference that you can define all AppBars in you page in xaml.

    
        
            
            
            
        
    
    

提交回复
热议问题