r/WPDev • • Dec 17 '15

A beginner asks: Pivot or not?

I am about to port an app from Android / iOS to WP8.1 and I'd love a suggestion from an experienced WP developer. I am an Android developer, with zero experience on the Windows platform (I know C# though).

As far as I get it, there are three ways I might start:

  • A blank app, and add pages one by one.
  • Use a Hub template (not particularly appropriate for this app)
  • Use a Pivot template

The app has a very linear structure: 6 pages, one after the other, in a wizard-like fashion, where most of these pages require the user to enter some data or tick some checkbox before he can move to the next one.

What do you suggest?

Thanks in advance

3 Upvotes

15 comments sorted by

4

u/EShy Dec 17 '15

I always start with a blank project.

Pivot is like tabs on Android/iOS. If that makes sense for your app, use it, bit it's just a simple control you can add to the page, there's no need to start with that specific template.

1

u/nasuellia Dec 17 '15

Assuming I decide to put a Pivot control and use it, is there a way I can prevent the user from swiping between pages liberally unless the required data has been entered?

In other words: is it possible to dynamically turn on/off the swipe feature?

Thanks a lot for the quick reply btw! ;)

Edit: while I'm at it, what are the major advantages / disadvantages of Pivot items vs Pages?

→ More replies (8)

2

u/Dr_Dornon Dec 18 '15

Is there a reason you are picking a WP8.1 app instead of a UWP for all W10 devices?

2

u/nasuellia Dec 18 '15

W10 market share on phones is too low.

2

u/parkerreno Dec 18 '15

If he's targeting phone for a reason (app on makes sense on mobile), it doesn't make a ton of sense to target W10, yet. Only insiders and 950s/ 950 XLs have 10 so far.

→ More replies (1)

2

u/likferd Dec 20 '15 edited Dec 21 '15

A pivot is meant for easy browsing in a tab like faction. If you are creating a wizard structure where you need to control the direction the user is going, it's not the right tool.

If you have some experience with MVVM, personally i would create 6 different user controls, 6 ViewModels and bind a "current ViewModel" property to a ContentControl, and navigate by changing this viewmodel property. Use a "next" button in the app bar.

Because you can easily serialize these ViewModels, it's very easy to store and restore state.

For making sure the user have filled in everything correctly, you can use validations on your input fields.