The Desktop Bridge helps us convert Win32 apps to UWP apps without needing an immediate and massive rewrite. Microsoft is pushing developers to do all desktop application in the Universal Windows Platform (UWP) model. UWP is the latest in their application framework technologies, targeting Windows 10 across desktop, tablet and mobile versions.
Unlike UWP, which runs apps in containerized, sandboxed execution environments, previous frameworks (like WinForms) gave applications unfettered access to the operating system. Those UWP containers greatly simplify deployment, increase security and reliability. But what do you do if you have an existing app that would be difficult to convert in one fell swoop? Doing things the UWP way versus the Win32 can be dramatically different.
That’s where the Desktop Bridge (aka Project Centennial) comes in. The Desktop Bridge helps developers migrate to the UWP environment by:
- Migrating deployment and configuration into the Windows App Store
- Exposing modern UWP API’s to older applications
- Running those applications in a controlled UWP container
In order to learn about the Desktop Bridge, we’re going to take a very simple WinForms application and convert it to an AppX package. The app we are going to use doesn’t do anything other than animate some fish swimming across a user’s desktop. It’s simple so that we can concentrate on the conversion. However, it does do things like make Win32 interop calls, which means it couldn’t be done as straight UWP without a full rewrite.
The end result is an app in the store called Fishy Fishy Fish, but the fun bits will be figuring out how to get it there…
- Create an AppXManifest
- Build an AppX package
- Debug your AppX
- Add some UWP features
- Add telemetry