Difference between revisions of "How Dialog Forms Work"

From truxwiki.com
Jump to navigation Jump to search
Line 11: Line 11:
 
:# [[ How Reports are Displayed ]]
 
:# [[ How Reports are Displayed ]]
 
:# [[ How Dialog Forms Work ]]
 
:# [[ How Dialog Forms Work ]]
 +
:# [[ Forms with Images ]]
 +
:# [[ Images ]]
 +
:# [[ Bookmarks ]]
  
 
== Overview ==
 
== Overview ==

Revision as of 11:29, 30 November 2021

This page documents how the Dialog Forms in Truxton work, or forms that pop up in a modal window work.

UI Guide Menu

  1. Entry Point
  2. Navigation and Routing
  3. Databinding
  4. Dependency Injection
  5. Task Bar Icon
  6. Truxton CLI options
  7. How Reports are Displayed
  8. How Dialog Forms Work
  9. Forms with Images
  10. Images
  11. Bookmarks

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. The page will contain a form but the form's logic and UI is stored elsewhere.
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.