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
1 answer

Is it possible to restrict the user from re-sizing a UWP app?

I am trying to port my existing WP8 app to Windows-10. Planning to release it in phases with just WP10 as primary target for phase-1. However I want to be able to release the same/slightly-scaled-up UI to desktop as well in phase-1. I have been…
Win10Devv
  • 49
  • 1
  • 2
4
votes
2 answers

How to make a ItemsWrapGrid in UWP using C#?

Question: How can I make a Grid with a ItemsWrapGrid layout in C#? Context UWP Visual Studio 2015 Windows 10 C# Background I know how to make it in XAML. After creating a new UWP application in Visual Studio 2015, the XAML is:
Nat
  • 1,085
  • 2
  • 18
  • 35
4
votes
3 answers

How can I add space to the end of a TextBlock in XAML? (Windows 10, UWP)

Text="Some text:" I want to add a space after the colon. I've tried xml:space="preserve" and   but neither seems to work. I know it can be done by adding margin, but I'm curious if there's another way.
Viktor Simkó
  • 2,607
  • 16
  • 22
4
votes
1 answer

How to get list of system colors in uwp

I would like to build simple ColorComboBox, but I don't know, how do I get system colors(KnownColors) in Universal Windows Platform with c#. Type KnownColors is not accessible.
Ive
  • 1,321
  • 2
  • 17
  • 25
4
votes
1 answer

How to make ScrollView horizontally scrollable in a UWP app?

Developing a Windows 10 UWP (Universal Windows Platform) app here... I have a long text and I don't want to wrap it in several lines. I want it to be long so that the end user can horizontally scroll to see the entire text in one line. …
L_A_Hooper
  • 81
  • 1
  • 9
4
votes
0 answers

Long RichTextBlock inside a ScrollViewer, how to implement virtualization?

Currently, I'm showing a really long text inside a RichTextBlock inside a ScrollViewer. The problem is since ScrollViewer doesn't support virtualization, loading the page takes a few seconds, and changing font size (it's an option for the user)…
Mahdi Ghiasi
  • 14,873
  • 19
  • 71
  • 119
4
votes
2 answers

How to make frosted glass effect in Windows 10 Universal App?

So, how to make such effect using C# & XAML?
4
votes
2 answers

Can't create a UWP app

I recently, upgraded to Windows 10 and got Visual Studio 2015 Community hoping to build UWP apps and ASP.Net 5 apps. At first, I installed everything, but ended up skipping / canceling the Windows 8.1 / 10 mobile emulators (my PC can't even run…
James Parsons
  • 6,097
  • 12
  • 68
  • 108
4
votes
3 answers

How do you change the title bar color in a Windows Universal app?

I am looking to change the colors of the title bar to better suit my app similar to what has been done in the Mail app. How would I go about doing that?
4
votes
1 answer

How to launch application inside an app container?

I'm currently looking for a way to programmatically launch a modern (uwp) application inside an app container using the available Win32 APIs. I don't want to launch the app through a protocol '://app'. Instead I want to create the app container…
4
votes
1 answer

BackgroundTask UWP Windows 10 TimeTriggeredTask Example registered but never fires up

I am testing the Background Example with the Scenario4 and it never calls to Run, I am following the steps and that's what I see: 1.- After calling BackgroundTaskRegistration task = builder.Register(); The task has Trigger = null Does it should…
Juan Pablo Garcia Coello
  • 3,192
  • 1
  • 23
  • 33
4
votes
3 answers

Multiple VisualState Triggers for a single Visual State

I'm trying to write a VisualState for my new Universal app under Windows 10. According to the documentation about VisualState.StateTriggers, you can add multiple triggers to a visual state, as the property is of type IList. The…
Stefan Over
  • 5,851
  • 2
  • 35
  • 61
4
votes
1 answer

XBF Error with DataTemplate in Application.Resources

Universal Windows Platform app with Visual Studio 2015 (RTM) I have a DataTemplate that is used in multiple pages of my app, so I'd prefer to write it once and access it from anywhere I need to. In order to make it accessible by any page, I write it…
Sean Scott
  • 41
  • 1
  • 6
4
votes
4 answers

Get available screen size

How can I get the screen size of max size the app can be resized to on Win 10 UWP? Also is it possible to detect if the app is maximized or running in phone/tablet mode vs. in windowed mode?
user1744147
  • 1,099
  • 13
  • 30
3
votes
1 answer

Is there a limit on the connection duration using AppService?

I have a UWP app that hosts an AppService in it's same process (in-process AppService). When consuming that AppService from a Console app running in the same PC the UWP host app is running (and while it is running), I have noted that the…
Miguel
  • 143
  • 1
  • 7