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
3
votes
0 answers

Visual Studio does not build UWP app when using /std:c++20 and disabling /ZW

I am really curious if this is happening to anyone else and it's some bug that I have to report or if it's my configuration. Basically I have fresh new Blank App (Universal Windows - C++/CXX) project which I am trying to build and run with C++…
alexmro
  • 55
  • 2
  • 12
3
votes
2 answers

UWP XAML NavigationView - CornerRadius on Content Panel

I am new to XAML and I am implementing a NavigationView control in my UWP application. Some details: Visual Studio 2019 Microsoft.UI.Xaml version 2.6.2 (Nuget Package Installed) UWP Targets: Target: Universal Windows Target Version: Windows 10,…
3
votes
1 answer

How to Launch UWP app from Task Scheduler

I have an app that converts UWP InkCanvas drawings into SVG from UWP native ISF. I need to run it daily, and the conversion logic does not work in either Console apps, WPF apps or Windows Forms apps with Ink Canvas - as there appear to be…
Nick Goloborodko
  • 2,883
  • 3
  • 21
  • 38
3
votes
0 answers

How to use Windows.Media.SpeechRecognition offline?

I am trying to dictate speech to text offline which can be done by Windows.Media.SpeechRecognition Namespace documentation doesn't provide the details on how to do continuous dictation On Device or Offline. I am investigating the sample that…
Ali123
  • 740
  • 13
  • 38
3
votes
1 answer

Is there other way to get the Microsoft Edge DevTools Preview without Microsoft store?

I always debug the WebView control with VS, I refer to the this official document Debug a WebView control in a UWP App. Recently, I found there is a best way to debug the WebView control by using the Microsoft Edge DevTools Preview App. The problem…
jerry
  • 317
  • 2
  • 20
3
votes
2 answers

How to resolve error CS0433: The type 'type' exists both in 'Microsoft.UI.Xaml,...' and 'Microsoft.UI...'

I'm making a UWP Windows app in C# using WinUI 3.0 and a few days ago I started getting this kind of error: CS0433 The type 'NavigationView' exists in both 'Microsoft.UI.Xaml, Version=255.255.255.255, Culture=neutral, PublicKeyToken=null,…
user15860111
3
votes
1 answer

In UWP, where should I save user data?

I made an UWP app for Microsoft Store. However, user data automatically saved in the LocalState folder will be deleted every time the app is updated. I want the data to be retained after every updating, so I'm trying to suggest the users to save…
Fish
  • 45
  • 6
3
votes
1 answer

Does UWP need .NET/.NET Core To Run On Client?

I have looked for this everywhere but cannot understand what to do. I understand that UWP apps need their dependencies installed, but do they also need .Net/.Net Core installed on the client machine? What I am doing: Using another UWP app and the…
admin
  • 55
  • 5
3
votes
1 answer

UWP Grid Splitter always stick to mouse

The issue is continued in WindowsCommunityToolkit repo: https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3949 TL;DR - See bold text in description. As seen in the gif below, the mouse/cursor is on the grid splitter until the…
tscpp
  • 1,298
  • 2
  • 12
  • 35
3
votes
1 answer

Can't test Windows.Services.Store namespace

I've followed the instructions but can't get this guide to work https://learn.microsoft.com/en-us/windows/uwp/monetize/in-app-purchases-and-trials#testing. When I try StoreContext::GetAssociatedStoreProductsAsync and…
Tom Huntington
  • 2,260
  • 10
  • 20
3
votes
1 answer

How to programmatically create a Subscription Add-On on Microsoft Store via API

I need to create some Add-Ons of type "Subscription" for my UWP product in the Microsoft Store. I have seen several API that are used to manage the subscription (e.g.…
3
votes
0 answers

How do I add DPI-Awareness to my Visual Studio project?

In the ValidationResult that I get when readying my app for submission to the Microsoft Store (which my app "PASSED WITH WARNINGS") , I got this "Warning" under the "High-DPI support" section of the report: I definitely do not want users to…
3
votes
1 answer

SelectedItem selection lost when updating ItemsSource to the ItemsControl

I have a custom RibbonGallery control like in Excel, MSWord, and Outlook. Please refer the Excel RibbonGallery image below and Normal selection still exists. And I kept two ItemsSource, one for RibbonGallery View and one for Popup, and arranged…
Kanniyappan P
  • 281
  • 1
  • 6
3
votes
0 answers

How to enable Apps For Websites API for uwp apps deployed via the Microsoft Store?

I'm adding this API to my app: https://learn.microsoft.com/en-us/windows/uwp/launch-resume/web-to-app-linking. This API allows websites to open UWP apps instead when the user clicks on a link from another app. In debug mode, this all works correctly…
Daniel
  • 126
  • 1
  • 8
3
votes
3 answers

SaveFileDialog is not working in UWP even after import Win32 namespace

I'm trying to create a save button with the SaveFileDialog in C# with UWP and XAML. I tried to import Microsoft.Win32 like this post said, but it's not working. The SaveFileDialog() function tells me: Error CS0234 The type or namespace name…
altude
  • 41
  • 6
1 2 3
99
100