How Dialog Forms Work
Jump to navigation
Jump to search
This page documents how the Dialog Forms in Truxton work, or forms that pop up in a modal window work.
UI Guide Menu
Overview
- In the Truxton Analyst App, there are a few pages that have forms to add or update data related to that page. A few examples include: Subjects, Media, and Investigator.
- Generally, to change data related to those models, you would go to that page, click a button that opens a form, change the data, and click the button when you are done. When this happens, there are a lot of things happening behind the scenes. A lot of it abstracted out so that there is a centralized code for the common functionality.
- For each model, there is a "-PageViewModel", "-Form", "-ViewModel", "-.xaml".
Resource Summary PageViewModel.cs This class loads and manages the data on the page, the view that you look at when you navigate using the navigation menu. Form.cs This class loads and manages the data on the Dialog Form, the form that you see when you're on the page and you click the "add" or "new" button. The xaml bindings are here mostly. The FormItems properties are loaded here but they are not defined here. This class also converts the FormItem model to the main Model. ViewModel.cs This class defines the Model for the FormItem. The FormItem is the model loaded by -Form.cs that contains all the data from the UI. .xaml Found in Templates/Forms, this xaml defines the form UI. Not to be confused with the View's xaml which may be later added into this wiki.