-
Notifications
You must be signed in to change notification settings - Fork 130
UWP vs. WPF
This article compares the Universal Windows Platform (UWP) with the Windows Presentation Foundation (WPF).
WPF is an UI technology stack based on the .NET Framework. UWP is a complete new application platform which was introduced as an alternative to the classic Win32 application platform. This evaluation compares both technologies on the application platform level.
UWP provides different UI technology stacks for writing UWP Apps. These are:
- XAML UI and a C# or VB managed backend
- XAML UI and a C++ native backend
- DirectX UI and a C++ native backend
- JavaScript and HTML
This comparison takes for UWP only the XAML UI and a C# or VB managed backend variant into account.
The term Universal in Universal Windows Platform might be misleading. Apps written for UWP are running only on Microsoft Windows. They cannot be used on other operating systems like Android or iOS. In Microsoft’s context universal means that these Apps are not limited to classic desktop PCs or notebooks. Other device types like Phones or the Xbox are supported as well.
The following comparison table shows how these technologies differentiate from each other:
Topic | WPF | UWP (XAML UI) |
---|---|---|
Introduced in | 2006 (.NET Framework 3.0) | 2015 (Windows 10) |
System Requirements | >= Windows XP | >= Windows 10 |
Supported device types | PC, Notebook, Tablet | PC, Notebook, Tablet, Phone, Xbox, IoT, Surface Hub |
User interaction | Optimized for keyboard and mouse | Optimized for touch |
Application model |
|
|
UI technology stack | WPF is built from scratch with more than 80% managed code. | XAML UI is a complete new native UI stack. |
Rendering | Vector graphic UI based on DirectX | Vector graphic UI based on DirectX |
Customization |
|
|
Styling / Theming | Styling support is very powerful. But it is also complex. | Similar as WPF but it has much more limitations. |
UI Definition | Declarative: XAML (XML dialect) | Declarative: XAML (XML dialect) |
Deployment |
|
Limited to Microsoft Store
Sideloading for internal distribution |
Distribution | No limitations. Does not depend on an App Store. | Only Microsoft Store or Sideloading can be used. |
Resource access | Applications can access all resources the user has permission for (e.g. file system). |
Resource access is defined by App Capabilities. This way a user sees what the App is allowed to do (e.g. use location service). An App cannot overcome some restrictions. Examples:
|
Performance | Managed code is in general slower than native code and requires more memory. | UWP Apps written in C# or VB are compiled to .NET Native. This way the app has almost the high-performance of a native app. |
Long term support | Yes. WPF is part of the .NET Framework. | Yes. UWP is part of Windows. |
Mature | Yes. This technology is in maintenance mode. Innovative improvements are not expected anymore. | Not yet. This technology is developed actively. |
Tool support | Visual Studio XAML designer; Expression Blend | Visual Studio XAML designer; Expression Blend |
Known drawbacks |
|
|
Here are some characteristics shared by both technologies:
- Support for Separation of Concerns:
- Separate language to describe the UI layout (XAML)
- Powerful databinding allows a cleaner separation of UI and domain logic
- Command pattern
- See also Model-View-ViewModel Pattern