Binding Pivot control with Observable Collection MVVM (windows phone 8)

前端 未结 3 558
北海茫月
北海茫月 2021-01-19 17:22

I\'m new to WP8 & MVVM. I created wp8 app which requests various bits of data once a user has logged in. I just can\'t get my pivots header to get created dynamically an

3条回答
  •  暖寄归人
    2021-01-19 17:58

    This all looks fine to me, so I'm thinking that App.MainViewModel.Pivots is null or empty when the Constructor is called (therefore the Pivot control is empty), and that you end up creating a new instance of Pivots in your MainViewModel after the MainPivotViewModel is instantiated.

    Have you tried putting a break-point in the getter for MainPivotViewModel.Pivots to confirm that there are some items?

提交回复
热议问题