Passing a string between pages in Windows Phone 8

前端 未结 5 1871
自闭症患者
自闭症患者 2020-12-16 04:53

I need to pass a simple string between two pages in Windows Phone 8. I\'ve been searching around, trying to find the best way of doing it - but the ones i tried turned out t

5条回答
  •  囚心锁ツ
    2020-12-16 05:03

    Take a look at Caliburn.micro. It is really simple to set up and lets you pass parameters through views in a strongly typed manner, like this:

    public void GotoPageTwo() {  
            navigationService.UriFor()  
                .WithParam(x => x.NumberOfTabs, 5)  
                .Navigate();  
    }
    

    http://caliburnmicro.codeplex.com/wikipage?title=Working%20with%20Windows%20Phone%207%20v1.1&referringTitle=Documentation

提交回复
热议问题