c# - Windows Phone 8 : How to load content for each pivot item using MVVM? -


I am using Pivot control in my app. I want to load the contents of each pivot object through a remote url (i.e. using web services).

For example - I have a detailed pivot page of a dish. It has 3 axis objects - information, reviews, gallery. And it has a progress indicator on the system tray.

Once I want to load the data of each pivot object, if the user swipe back on the previously loaded pivot item, then he should not request the web again for that pivotal item and In that case the progress indicators should be invisible. .

Should I use a single menuitom model for each vivid item or for everyone?

How to manage the visibility of the progress indicator in the Pivot page?

Can I create UserControl for each pivot object?

The page's role is to show data for an "unit", recipe. Because of this, I will only use a recipe view model and will not also prepare user control for pivot items.

You can use the binding to manage progress indiador. I personally use a legacy inherited from PhoneApplicationPage, where I make the code behind the code, eg:

  if (SystemTray.ProgressIndicator == null) {var indicator = New progress_indicator {isIndeterminate = true}; Var Scene Pathming = New Compulsive ("progressive ISActive"); Binding operation .Setbinding (indicator, progress indicator. ISVbiport, visible padding); System Tray SetProgressIndicator (this, indicator); With this, you just need to toggle the active proactive property on your view modal 

I will only use different view models for smoke items when the pivot objects are drawn (example: list of recipes, contact information, in a pivot).


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -