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)?
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.
Related
I want to save myself some time (I have two weeks of my internship left) by creating a simple reusable component based on a Region I created for a reporting page.
It consists out of a Static Region with the collapsible Template, containing 3 very similar Diagrams.
There is one Value which is the same for all 3 Diagrams, and 2 Values I need to change for each diagram.
Any tips how to reach that goal? Copying is dreadful, since I need that component 19 times on this page. I have no experience with creating plugins for APEX.
if you have already created the region you can duplicate it as many times as you like on that page by right clicking the region in the Rendering Tab on the left side of Page Designer and clicking the Duplicate option from the menu:
This is a lot faster than recreating the region from scratch each time. You can also do this to duplicate buttons, page items and dynamic actions.
I have created a large Access Form that spans the form header, all of the detail section 22" and form footer. When viewing the form it will not allow scrolling.
I have copied elements into a fresh database and a new form with the same results. I can send a zip file with this single form to anyone interested in helping.
Ensure that you have the Scroll Bars property set to Both or Vertical Only in the Form Properties:
Seems I figured it out. My Form Header Section was too long. Seems once it gets past 10" it disables the scroll bar on my screen as I was trying to use it improperly to extend the length of my form which is limited to just the 22" . Makes sense that the Header section is not designed to be scrolled, but I had some large images with text boxes between them. Just met a limit of Access
I have Generic Tiles in my UI5 App. My requirement is to implement the functionality of Icon Tab Bar - Filter (https://sapui5.hana.ondemand.com/explored.html#/sample/sap.m.sample.IconTabBar/preview) for these tiles. I have separate tile for each status and on clicking it should display the list in the table depending on the clicked status eg: 'completed tickets'.
The table and the tiles are in different views. If this is possible please provide suggestions as to how this can be accomplished.
Thanks,
Srinivasan
You could follow the example of the IconTabBar almost literally, and just swap the icons for tiles.
When you press an icon in the IconTabBar in the example, the logic connected to that icon will add a filter to the binding of the table. You should do the same: the logic connected to your tiles, should also change the filter of the table binding. Every tile could result in a different filter to the binding. With that, you would see the table filtered based on the tiles you clicked.
With your table being in a different view than the tiles, you may want to use the router to communicate between the two views. You could e.g. have tile one to navigate to /YourApp/#/Stuff/FilterBySomething and tile two to navigate to /YourApp/#/Stuff/FilterBySomethingElse. In the view containing your table, you should then pick up the filter info and add the filter to the table binding accordingly. More info on how this works can be found in Step 31 of the SAPUI5 walkthough.
Here's the issue, I build a special book reader/browser (For holy quran), my code behind loads the page and constructs how it should look. and then it should bind that look to a some kind of data-bindable custom control to view it properly. the problem is, the look differs from page to page, so I cannot bind to a certain control or wrap panel.
here's how it generally looks:
The decorative border top of the page is always there at any page, it indicates the part and chapter the viewer is in.
If you're starting a new chapter it have additional image under that decorative border or anywhere in the page (there can be multiple chapters in the same page) something like this
or this:
The normal text is not an issue, it's just a special font, however, I put each individual word in its own text block for reasons of user selection by word.
The issue here is, given the previous information, and knowing how random it is to place the decoration picture or the amount of words (text blocks) per page. how can I bind that to some kind of view to separate the view from the VM and Engine that builds the page.
my past solution was to actually build everything in the VM in a wrappanel built inside a scrollviewer having lots of textblocks and images according to the page. but that's naiive solution. I want to rebuild that in a more professional separated way. I also want to do this for Windows RT beside Windows phone so I need to reuse the code behind in a Portable class library.
I think all you need to do is slightly adjust your current design. So perhaps have a VM that represents the entire content, and that would have a Collection of say Pages or Sections. A second VM would represent the Page/Section, allowing you to create a property for the WrapPanel content (i.e. the words) and another property for the Header and or other things.
In the View you would have the scrollviewer and bind to the main VM collection. Then create another View or DataTemplate that represents the Page/Section.
You should be able to do this is a strict MVVM sense quite easily and it will be dynamic based on the content.
You could even cater for advanced scenarios where each section has a different template/view.
I have a MVP type application where I will have a view that contains one or more buttons. The number of buttons is not known till run time and may vary each time the page is rendered. What is the best way to approach this apart from a simple loop that will just display 1 - n number of buttons that are passed to the view?
My suggestion: Add all the buttons on creation and use CSS to hide or show them dynamically. I think this will yield less DOM manipulations and still works the same, also it might produce a simpler code. I currently do it that way using SmartGwt.