UI - Truxton Analyst - Dev Guide

From truxwiki.com
Revision as of 10:41, 30 November 2021 by Adrian (talk | contribs) (→‎UI Guide Menu)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page is a developer's guide to the User Interface of the Desktop application called Truxton Analyst.

Work in Progress This guide is written by a new developer as he explores the Truxton application. The information in the guide may not be complete and new information will be added as discovered or as needed.

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

Summary

Primary Technology WPF, .Net, C#
Design Pattern MVVM
Preferred IDE Visual Studio Professional - Should have license through Office365 account
"Gotchas" Things to look out for:
  • when an LE machine is decomissioned you can't install truxton on it any more
    • Media loads will error with: Truxton has been decommissioned on this machine.

Running a Development Build

When running a Development Build, you'll have access to various tools for development such as: debugging, hot reloading, inspecting elements, etc.
To run a Development Build, build the whole project so that Truxton is installed (startover.cmd or compile.cmd). When Truxton is installed, ensure that the Truxton Analyst app is closed. Then run TruxtonClient from Visual Studio. Basically, we want the other services running so that the Development Build for the UI has the services to work.
Useful tools when developing the UI
When debugging, you can set breakpoints and use the different windows to monitor the variables, call stacks, and stack traces.
In the client view, a dev toolbar will be at the top of the screen. One of the more useful tools includes the Element Selector that will focus on the element in the Live Visual Tree in Visual Studio. Once focused in the Live Visual Tree, you can navigate and investigate the element and its parent and sibling elements. You can also directly go to the associated code with a click of the button.

Designer Window in Visual Studio

When creating the User Interface, you can create/update each View using XAML or using the Visual Studio Toolkit. The Designer Window will display the UI as each change is made. Using the Toolkit, you can drag and drop UI Elements and edit their Properties by right clicking them. It's a useful WYSIWYG tool.
Unfortunately, the Designer Window doesn't always work. Don't get hung up on it, use it when you can but don't rely on it. Paul contacted Microsoft at one point but they couldn't do anything about it. It used to crash Visual Studio, but for me, it doesn't. So there's that.
A working and not-working DesignerWindow with Toolbox