[nfbcs] Developing Windows Application with Visual Studio

Glen Gordon GGordon at VFOGroup.com
Thu Jun 28 11:26:24 UTC 2018


Joe,

Because of layout challenges as a blind person with WinForms I recommend going with WPF if you have the time to learn it and redesign theUI.

WPF has a pretty steep learning curve, and mastering MVVM is critical to doing things that go beyond the extremely simple.
There is a WPF forms designer but it's less accessible than the one for WinForms. The good news is that UI is generally created using an XML syntax in XAML files and relies on layout managers. Essentially you nest various containers within one another and put controls within the containers specifying minimum and maximum size constraints. The layout manager automatically lays things out based on the constraints you provide.
I've found it pretty easy to have a sighted person come along, look at a layout and say things like "that edit box isn't big enough for the text," "the list view is so tall that the controls at the bottom are pushed off the screen," etc. I was then able to add additional constraints to resolve the problems.

If you do go the WPF route, I highly recommend using the MVVM Light Toolkit to help with the boilerplate MVVM code.

--Glen

Glen Gordon
VFO | Vice President & Chief Technology Officer
11800 31st Court North, St. Petersburg, FL 33716
T 727-299-6230
ggordon at vfo-group.com
www.vfo-group.com


-----Original Message-----
From: nfbcs <nfbcs-bounces at nfbnet.org> On Behalf Of Joseph C. Lininger via nfbcs
Sent: Thursday, June 28, 2018 12:16 AM
To: NFB in Computer Science Mailing List <nfbcs at nfbnet.org>
Cc: Joseph C. Lininger <devnull-nfbcs at pcdesk.net>
Subject: [nfbcs] Developing Windows Application with Visual Studio

Hi guys,
I think I asked a generic version of this question a few years ago, but honestly I can't remember what suggestions if any people had for it. Now I have a more specific question involving Windows software development as a blind person. Just so we're clear, my development environment is as follows.

* Windows 7
* Visual Studio 2015 or Notepad++ for writing code (I use both depending on the situation)
* NVDA screen reader, with access to an older copy of Window-Eyes as a backup. NVDA seems to work fine with both VS and NPP.

Alright, now let me tell you about the problem I'm having. The project I'm currently working on at work is a system which consists of a bunch of custom DLL files, a console application, and a GUI application. The entire thing is written in C#. Developing and maintaining the DLLs and the console appplication are not a problem. The problem is the GUI.

Does anyone have any tips for placement of GUI elements, both for new and existing applications? I could probably ask someone with sight to do the GUI building, or at least the layout portion with me wiring everything together later, but the more of this I can do independently the better. Ideally, I would be able to do all of it and just have a sighted person fine tune the look at the end to ensure the controls are properly sized and such. I'm planning several follow-on releases of the software after this big release, and the GUI may need to change with one or more of those. Having someone continuously redoing part of what should be my work would not be ideal. I'm having problems keeping controls from completely covering other controls, though, which makes it hard for even a sighted person to go in and fix it after the fact (since they can't see anything I accidentally obscured.) I'm willing to use either WinForms or WPF for the GUI design. Right now the application uses WinForms, but I can redesign it to use WPF if I need to. I have a basic GUI that a previous developer built, but it needs to be redesigned so the GUI can take advantage of the new capabilities offered by the system.

Let me finish this email by describing what I've already tried. I noticed that all the form designer does is to generate what is actually relatively simple (if a bit long-winded) C# code. The form designer itself is mostly accessible, aside from the fact there is no way I know of to place and size controls without using the mouse. I thought I could use the form designer to create the controls (and the code that goes with them), then manually edit the generated code to properly position and size the controls. The problem is I would have to specify the positions and sizes in pixels, and it's proving to be difficult to know exactly what values to use for the various properties. It is also hard to know what is visible and what isn't. Has anyone by chance solved this problem? If so, what techniques did you use and how efficient was it?

Any insights you can offer would be much appreciated.
Joe

_______________________________________________
nfbcs mailing list
nfbcs at nfbnet.org
http://nfbnet.org/mailman/listinfo/nfbcs_nfbnet.org
To unsubscribe, change your list options or get your account info for nfbcs:
http://nfbnet.org/mailman/options/nfbcs_nfbnet.org/ggordon%40vfogroup.com




More information about the NFBCS mailing list