I am very new to Windows Phone Development, I am trying to work with Pivot, but facing issue in data binding. I want to change my Pivot Item data when navigated. Can anyone please help me in creating a simple MVVM for the Pivot.
Asked
Active
Viewed 339 times
1 Answers
1
First of all, you must read and UNDERSTAND this article
Then try to understand how to use existing mvvm toolkit, for example MVVM Light or Caliburn.Micro.
You should have a good understanding of how to work with MVVM and then you can solve your problem yourself.
Hope it's help.
Edit: Also check this useful question.
-
Actually my real issue is that I am facing problem in updating Pivot Itemssource, I have a pivot which have list of items, each item have feeds. When I flip to next item, I have code to update the feeds for that particular Pivot Item, but when I change the Items source it doesnt reflect anything and feeds comes null on the page. And when I do like this Pivot.Itemssource=""; Pivot.Itemssource= myFeeds;, On page first it goes to starting index which is 0 and then comes back to desired index. – Artist404 Apr 11 '13 at 07:24
-
Please, read all articles. If you will use correct MVVM - you have to assign 'ItemSource' only once! And then, you just need to update fields, when they changes. Please, please read more info about MVVM, before coding. It's right way. I hope for understanding. – jimpanzer Apr 11 '13 at 07:31
-
Thanks for the direction, It would be very helpful if you can give me links for the same. I searched alot but didnt get any related to my problem. – Artist404 Apr 11 '13 at 07:33
-
[this](http://stackoverflow.com/questions/4077756/refresh-pivot-control-with-mvvm-light-toolkit-for-wp7),[this](http://social.msdn.microsoft.com/Forums/en-US/wpdevelop/thread/d9a7952c-7f3d-4edb-b0c7-bd7f75c94292/),[this](http://www.infragistics.com/community/forums/p/78920/399075.aspx),[this](http://stackoverflow.com/questions/3655422/a-super-simple-mvvm-light-wp7-sample). – jimpanzer Apr 11 '13 at 07:39
-
Also [great book of wpf mvvm](https://www.google.by/url?sa=t&rct=j&q=&esrc=s&source=web&cd=5&ved=0CFUQFjAE&url=http%3A%2F%2Ffiles.cnblogs.com%2Fkingmoon%2FAdvanced.MVVM.pdf&ei=gmhmUYvFB4nbPKi2gdgO&usg=AFQjCNH9ea9cHjtoDyZUiV0t2BBHq5qQhg&sig2=fFVtjcMrAtXRJaw08vUjaA&bvm=bv.45107431,d.ZWU&cad=rja) – jimpanzer Apr 11 '13 at 07:40
-
I read all the links u gave but I didnt get any feasible solution.. – Artist404 Apr 24 '13 at 10:42
-
realy, I don't know. I flagged previous Leons comment. – jimpanzer Apr 26 '13 at 06:18
-
Bingo I found a solution on my own..:) – Artist404 Apr 29 '13 at 12:59