Questions tagged [uwp]

The Universal Windows Platform is a common software platform for all devices running Windows 10, including Desktop. This tag should be used for questions regarding developing UWP applications on any of the supported device families. Other tags such as the languages being used (C#, C++, etc.) and the style of API (Win32, WinRT, etc.) can be added. Packaged Win32 Applications should use the Desktop-Bridge tag (possibly in addition to UWP).

Universal Windows Platform

Windows 10 introduced the Universal Windows Platform which was an evolution of the "modern" platform first introduced with Windows 8. UWP replaces the disparate legacy platforms and unifies all Windows devices (Desktop, Xbox, IoT, Surface Hub, HoloLens, etc.). UWP is the focus of all future Windows platform innovation at Microsoft - including on Desktop Windows - with many of the original differences between "UWP apps" and "Desktop Win32 apps" having been removed. UWP consists of Win32, COM, WinRT, and .NET APIs.

UWP introduced or refined several new technologies, many of which are now available to Win32 apps:

  • MSIX (nee AppX) packaging.
  • Declarative extensibility and integration points.
  • AppContainer-based security and privacy.
  • MRT resource packaging and resolution.
  • XAML-based UI, including modern input (touch, pen, and game controller).
  • WinRT platform APIs.
  • The Microsoft Store

MSIX enables the clean install, servicing, and uninstall of applications, including packaged Win32 applications. It enables apps to integrate with the Windows shell and cooperate with other apps via a declarative extension mechanism.

AppContainers run apps with a minimal set of permissions by default, ensuring they are isolated from each other and the system. AppContainers use an explicit permissions-based security model (known as "capabilities") to request additional access to resources like the network, the user's location, or a camera. Packaged Win32 apps do not typically run inside an AppContainer.

MRT is a unified resource management technology, allowing apps to specify resources across a diverse set of axis (language, scale-factor, accessibility, home region, etc.) with the most-applicable candidate being loaded automatically at runtime. MRT is available to Win32 applications.

XAML, the UI framework for UWP, uses a declarative XML dialect to define UI layout. It will be familiar to anyone who has used WPF or Silverlight, but XAML has been updated to better integrate with DirectX rendering and use modern inputs such as touch, pen, and game controller. It is also no longer limited to .NET languages (it is usable from C++) and it can be used from Win32 applications.

The runtime platform consists of a set of Windows Runtime (WinRT) APIs, a growing subset of COM & Win32 APIs, and a cross-platform set of .NET APIs. Most UWP APIs are available on all Windows devices, and most UWP APIs are available to Win32 or Packaged Win32 apps as well. Using the Desktop Extension SDK, Packaged Win32 apps can access virtually any existing Windows API or feature, but only work on Desktop Windows devices. Even if an application uses device-specific functionality, it can still run on other UWP devices if it avoids calling the specialized APIs when they are not available.

UWP apps (including Packaged Win32 apps) can be distributed via the Microsoft Store, but they can also be side-loaded onto most devices with traditional deployment mechanisms (enterprise deployment, web download, MSI-based installers, etc.). By default, all applications created with Visual Studio are able to run on all Windows 10 devices, but developers can restrict distribution in the Microsoft Store to one or more specific devices if they have a technical or business need to do so.

Resources

22264 questions
4
votes
4 answers

How to check if bluetooth is enabled on a device

I want to check if Bluetooth is enabled on a device (so that an app could use it without user interaction). Is there any way to do that? Can I also check Bluetooth and Bluetooth Low Energy separately?
wasyl
  • 3,421
  • 3
  • 27
  • 36
4
votes
1 answer

Windows Universal App Continuous Dictation Without Network

Following the samples provided here: https://github.com/Microsoft/Windows-universal-samples provides a great overview of some of the capabilities for UWP apps. But, the speech example seems to require an active connection to the internet. Does…
jrf
  • 41
  • 2
4
votes
2 answers

Is .NET Native required for UWP applications?

I am upgrading a Win8 application to UWP. .NET Native is causing a huge amount of issues, and a lot of WCF features that the application uses aren't supported. Is .NET Native required for UWP applications? Can I just disable .NET Native in the…
James Newton-King
  • 48,174
  • 24
  • 109
  • 130
4
votes
2 answers

Reference to type 'Component' claims it is defined in 'System'

Trying to get some WMI objects in a UWP application. Running VS2015 on .net 4.6. I'm getting errors for the ForEach and method calls stating "Reference to type 'Component' claims it is defined in 'System'" with error CS7069. using System; using…
Luke Griffith
  • 226
  • 4
  • 14
4
votes
3 answers

Is it possible to prevent suspend in LOB UWP desktop application/background task?

I have been tasked at porting a LOB desktop app from .NET 4.5.2 to Windows 10 UWP. In normal Win32 apps an app runs until the user closes the app (service and application). But when reading up on UWP apps all docs I find say that there is no way to…
maloo
  • 685
  • 1
  • 6
  • 16
4
votes
2 answers

UWP, App.Xaml: Override default brushes

If I need to override a color in a brush, I would set it into App.xaml like this: ...
Francesco Bonizzi
  • 5,142
  • 6
  • 49
  • 88
4
votes
2 answers

Why is {x:Null} no longer a valid value in a Style Setter in UWP?

A follow up to this question, why is {x:Null} no longer a valid option for Setter.Value? Put this code in a resource dictionary in your UWP app: