WPF

Thank You Open Source

I have a family member who has ALS which, among a lot of other things, remove the person’s ability to walk, talk and use their arms and hands. My family member is at the point that their arms and leg aren’t useable and speech is only understandable to a few.

Being the “computer person” in the family I have been helping to cobble together an assistive setup. We started with a product by Tobii which is meant for gamers but also works pretty well as a general eye-tracking device and paired that Windows 10’s eye control functionality on an entry-level Microsoft Surface Pro 6. This setup has helped to restore a level of interaction with the world that ALS had taken away and at a fraction of the cost of the medical grade solutions that are available.

One of the big items on our hit list was the ability to control an Amazon Fire TV Stick. For our first try, we used BlueStacks which is an Andriod emulator for Windows which allowed control of the Fire TV via a third party remote application (the remote application provided by Amazon is unusable as it requires swiping to get most actions done which don’t work well with eye tracking).

The above set up seemed like it was going to work well, but it turns out that the entry-level Surface Pro doesn’t have enough power to deal with BlueStacks without causing stability issues. After a lot of searching, I couldn’t find an alternative, so being a software developer I decided I would order my own Fire Stick and find a way to program one myself. Thanks to Amazone Prime I had my Fire Stick the same day.

I struck out hard on my Google-fu trying to find a way to control the device from Windows. This is where open source comes to my rescue. I found btastic’s repo windows-adb-remote on GitHub. Seems that btasctic forgot his remote when he was at his girlfriend’s house and whipped up a console application that uses adb to control his Fire Stick.

I was very excited at this point. Yes, adb made the interactions slow, but since the application was going to be used via eye control it was more than fast enough. Now I just needed a UI. I started working on a WPF front end, but before I got too far I decided noticed that a few people had forked btastic’s repo. Turns out that amolkamble46 had already added a UI in this repo!

I forked amolkamble46’s repo and added a bit of code to save the IP for the Fire Stick and I had all I needed. A couple of hours later the solution was installed and I got to the see the joy in the eyes of my family member all thanks to open source. Without the repos I found this process would have taken me so much longer.

I have always been thankful to the people who spend time working on open source software, but this has raised that appreciation to a whole new level. It also goes to show no matter your project or how useful you think it might be to other people you should put it out into the world because you never know when it will make a massive difference in someone’s life.

Thank You Open Source Read More »

Creating Desktop Applications in .NET Core 3

In my job, I still do a fair amount of work desktop related work which means when I heard that .NET Core 3 is going to bring support for Winforms and WPF I got pretty excited. This post is going to show you how to installing the preview of .NET Core 3 and then using the .NET CLI to a new Winforms or WPF application.

This information was covered in the .NET Core 3 Preview 1 announcement from December, but I thought I might as well document it here as I was trying it out.

Download and Install

Head over to the .NET Core 3 download  page and select the SDK for your OS. Keep in mind that Winforms and WPF will only run on Windows machines unlike the rest of .NET which is cross-platform. After the download is complete run the installer and follow the prompts.

Project Creation

Using the .NET CLI you can use the following command to create a Winform application.

dotnet new winforms

Of the following to create a WPF application.

dotnet new wpf

After the project is created for either type you can use the following command to run the application.

dotnet run

The following is an example of what you would see for a new WPF application.

Limitations

If you are going to be playing with the desktop-based framework I recommend that you grab the preview of Visual Studio 2019. Even with the preview, there are no designers available Winforms or WPF as of the time of this writing.

Wrapping Up

I know Microsoft has shown some neat demos, but in this first preview doesn’t have much tooling around it so if you are going to do much more than the new applications as I did above you are going to be in for a lot of manual work. Please don’t take this as a dig, as I said above I am very excited about this functionality.

If you are wondering about what versions of Windows .NET Core 3 will be supported on that information can be found here.

Creating Desktop Applications in .NET Core 3 Read More »