formsuwppivotflipview

UWP how to organize a gigantic input form


I am working on an input form with 218 input controls divided over 20 sections. What I did is to create a ViewModel for each section and define with a DataTemplate how it is supposed to look. The main page for the form is a grid of tiles. A tile per section. A section is a page in a FlipView where you can flip from one section to the next. A click on one of the tiles jumps directly to a page in the FlipView. Some sections contain a Pivot control that allow the creation of multiple items (i.E. persons). If the content in the Pivot is long, it needs a ScrollViewer. Pivots and ScrollViewer don't go well together. Scrolling does not work. There is a SO question and answer that adresses this: Pivot inside a ScrollViewer, scrollviewer wont scroll

The UWP Style Guide says

Rather than overwhelm the screen with numerous input controls, consider creating multiple pages for your form.

But it does not say how the pages should be organized.

So given a gigantic input form with 218 input controls and 20 sections where some of them can add multiple items, is there a better way to organize the form than what I attempt to do (FlipView, ViewModels, DataTemplates, Pivot, ScrollViewer)?


Solution

  • If the sections don't need to be filled out in a specific order, I suggest that you use the NaviationView class and group each section as a Page. The end result could be similar to the Settings app which has a number of disparate sections.

    If the forms need to be filled out in a specific order, use the Frame/Page navigation and provide previous/next buttons on pages.