In December 2019 I finished porting the Peakboard runtime from the Universal Windows Platform (UWP) to Windows Presentation Foundation (WPF) on .NET Framework 4.6.2. The runtime is the part of Peakboard that shows a board on a screen. The board files did not change. The runtime now runs as a desktop application on the same platform as Peakboard Designer.
Peakboard started as a UWP app. UWP offered a kiosk mode, a defined app lifecycle and support for Windows tablets. A UWP app runs in a sandbox, so it reaches only its own folder and the Windows functions allowed for Microsoft Store apps.
A board could not open a file on a network share or use a font installed on the machine. It could not print, and it could not load a driver or a library built for the full .NET Framework. Customers asked for each of these.
WPF has none of these limits. The runtime targets .NET Framework 4.6.2, the version that Windows 10 has included since the Anniversary Update of 2016. A library or driver written for the full framework loads without changes.
WPF has a second advantage. Peakboard Designer is a WPF application, so the designer and the runtime now draw every control with the same code. Before the port, every control existed twice, once for each platform, and the two versions differed in small details. A board now looks the same on the screen as in the designer.
Images and custom fonts leaked memory on boards that ran for days without a restart. A bitmap created from a file path kept the file locked as long as the bitmap existed. The file could not be replaced while a board showed it. I rewrote the resource handling so that it works with the board package instead of single files. Both problems took me longer to find than to fix.
Four smaller changes came with the port. The runtime can start without the local web server, and it can take a screenshot of the current screen. Exceptions appear in the Log-View with their context. The Retro Flipper Block control is pure drawing code, so I ported it instead of keeping two versions.
The UWP runtime stayed in the product for another year, so customers had time to switch to the new runtime. It was removed at the end of 2020.
That’s it.
If you have questions feel free to contact me.
Links:
Peakboard.com →
Peakboard Designer →
Windows Presentation Foundation →
Universal Windows Platform →