UI - Truxton Analyst - Dev Guide

From truxwiki.com
Revision as of 11:34, 2 November 2021 by Adrian (talk | contribs)
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

UI Guide Menu

  1. Entry Point
  2. Navigation and Routing
  3. Databinding

Summary

Primary Technology WPF, .Net, C#
Design Pattern MVVM

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.