Skip to content

Project Walkthrough

Tung Huynh edited this page Apr 6, 2025 · 3 revisions

This page provides an overview of the project and how to get started as a contributor.

Set up your development environment

To build Screenbox, you will need Visual Studio 2022 with the Windows application development workload selected. On the side panel, make sure the latest version of Windows SDK (at the time of writing Windows 11 SDK 10.0.22621) and Universal Windows Platform tools are selected. After installing, clone the project and open it by opening Screenbox.sln in the repo root. You can now build the app. Visual Studio will let you know if you need to install anything extra in the Solution Explorer panel.

Windows application development workload

Windows SDK

If you are using Windows 11 and this your first time deploying a UWP app on your machine, you may need to enable the developer mode in the Settings as well. See Enable your device for development for details.

Project architecture

Universal Windows Platform (UWP)

Screenbox is built on the Universal Windows Platform (UWP) app model. The UWP model was introduced in Windows 10 as a common app platform for all Windows devices, including desktop PC, Xbox, Windows Phone (RIP), Mixed-reality headset (RIP), and so on. You can read more about UWP in What's a Universal Windows Platform (UWP) app?. In short, using the UWP app model brings its pros and cons.

The main pros are:

  • UWP apps are fast. They can be as fast as Win32 apps if properly designed. This is thanks to the .NET Native tool chain that comes with UWP.
  • UWP apps use WinRT APIs to interact with system components. Working with WinRT is much friendlier than dealing with COM and data marshalling.
  • Access to WinUI 2, which makes everything look modern!
  • MSIX packaging and installation in the user space. UWP define a special location for applications to be installed in the user profile. No administrator permission is needed.

Some big cons:

  • UWP is already superseded by Windows App SDK. However, at the time of writing, Windows App SDK is not mature enough to transition to. UWP won't receive any feature updates.
  • The UWP app model restricts excessive access to the file system. Consequently, UWP apps cannot rely on file paths to access files. Instead, file system access must be triggered by the user (such as opening a file) or explicitly permitted by the system (for example, accessing user library locations).
  • There is no executable .exe file for UWP applications. Users familiar with traditional Windows programs may look for a .exe file, but in a UWP app, this file is hidden. Even if you manage to locate the executable, running it will not have any effect.

Model-View-ViewModel (MVVM)

The app roughly follows the Model-View-ViewModel (MVVM) pattern.

Clone this wiki locally