Microsoft Q&A

Universal Windows Platform (UWP)

2,523 questions

A Microsoft platform for building and publishing apps for Windows desktop devices.

Browse all Windows tags

2,523 questions with Universal Windows Platform (UWP) tags

Sort by: Updated
0 answers

How to involve C++/WinRT lib in C# UWP App on Visual Studio 2022

I have a pre-built C++/WinRT lib (dll/lib/winmd...), I want to use it in my C# UWP App。 I want to query how to involve the ilb in my C# UWP project. (where to add reference of lib/winmd files in VS2022). Since C++/WinRT is self language projection, so…

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,568 questions
asked 2023-03-27T11:25:33.5+00:00
Damon Pan 1 Reputation point
0 answers

Problems with creating a local build of a UWP project

Hi, there are some unknown problems with the local build of the UWP project. I am using visual studio 2022 with the latest version. When trying to create a build in the Release Version, I get the following errors shown in the screenshot. What could be…

Universal Windows Platform (UWP)
asked 2023-03-24T15:58:45.2166667+00:00
Roman Voskoboynikov 0 Reputation points
edited a comment 2023-03-27T08:20:29.4233333+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
0 answers

How to uncheck the click"allow bluetooth devices to find this pc" by windows api?

Hello, I want to use bluetooth to scan other devices, but don't want other devices can see windows pc. I found that if "allow bluetooth devices to find this pc" is checked, other devices can also find windows pc at any time. So how to make the…

Universal Windows Platform (UWP)
asked 2023-03-26T02:15:03.0266667+00:00
frank zhang 101 Reputation points
commented 2023-03-27T07:35:07.78+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
0 answers

How to restrict scrolling and panning with single finger and enable with two fingers in UWP ScrollViewer using touch screen?

Hi, In an UWP application, I am having a ScrollViewer in the XAML which contains a StackPanel as Content. In that StackPanel there are some images. XAML: <Grid> <ScrollViewer x:Name="scrollView"…

Universal Windows Platform (UWP)
Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,925 questions
asked 2023-03-27T06:02:13.86+00:00
Imman Kumar 6 Reputation points
1 answer

How to print in InkCanvas in the mvvm pattern

The window identifier is invalid. Windows.Graphics.Printing.PrintManager is not supported in the supplied view. A PrinterService has been made where it is: this failure occurs in the ShowPrintUIAsyn PrinterService. using…

Universal Windows Platform (UWP)
asked 2023-03-03T19:21:26.2566667+00:00
Javier R 186 Reputation points
commented 2023-03-27T01:54:10.1966667+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
1 answer

How to open downloads folder in explorer through LaunchFolderAsync?

How to open the downloads folder in windows explorer using LaunchFolderAsync? I get access denied if i use the below code. System.UnauthorizedAccessException - Message=Access is denied string folderUrl=UserDataPaths.GetDefault().Downloads; var folder =…

Universal Windows Platform (UWP)
asked 2023-03-22T04:16:20.41+00:00
DotNET Fan 56 Reputation points
edited a comment 2023-03-24T15:14:18.1433333+00:00
DotNET Fan 56 Reputation points
0 answers

Bluetooth Low Energy Multiply times ValueChanged notification

The GattCharacteristic.ValueChanged event handler is triggered multiple times. The same problem with "Windows-universal-samples" in "BluetoothLE" example. BluetoothLE" example... For example when I "connect to…

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,568 questions
Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,401 questions
asked 2023-03-19T13:20:12.9666667+00:00
Vladi 0 Reputation points
commented 2023-03-24T10:12:21.16+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
0 answers

How to make MediaPlayer work with YUV420P which has full color range in UWP app

It looks like that MediaPlayer can only work with YUV420P which has limited color range. If I construct a MedisStremSource from YUV420P with full color range, it plays but loses some grey color.

Universal Windows Platform (UWP)
asked 2023-03-01T06:04:43.7766667+00:00
HwengYang-6115 21 Reputation points
commented 2023-03-24T08:44:40.48+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
1 answer

How to do a AES decryption in UWP, for a data encrypted using RijndaelManaged in .NET Framework?

Hi, My UWP app receives some data from Server. The server is developed in .NET Framework. The server side encrypts the using the RijndaelManaged as below byte[] passwordKey = convertStringToByteArray("SharedKey"); using…

Universal Windows Platform (UWP)
asked 2023-03-15T03:11:13.1566667+00:00
Petchiammal Rajumayandi 41 Reputation points
commented 2023-03-24T08:43:47.04+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
2 answers

How do you make InputStreamOptions.Partial really be partial and not half the buffer size?

I am observing that InputStreamOptions.Partial isn't really acting partially, but typically requires 50% of the buffer to be full before it returns. fyi, this is in a loop: IBuffer blob = await SerialDeviceConnectedToRadioRX.InputStream.ReadAsync(new…

Universal Windows Platform (UWP)
asked 2023-02-22T15:11:32.43+00:00
Karhu Koti 6 Reputation points
commented 2023-03-24T03:17:58.5+00:00
Junjie Zhu - MSFT 6,721 Reputation points Microsoft Vendor
0 answers

The UWP camera APIs will break work randomly when switching different widnows users

Hello Guys, My UWP app will call [MediaCapture] relevant APIs to take some photos. Now, if I switch different users and the start the app again, the code will catch exception when it run into the call StartPreviewAsync method. The issue doesn't occur…

Universal Windows Platform (UWP)
asked 2023-03-20T03:07:25.2033333+00:00
Xie Steven 761 Reputation points
edited the question 2023-03-24T02:40:32.0066667+00:00
Xie Steven 761 Reputation points
1 answer

[UWP] Item Count Exception

when i am trying to use Search Query Options & get items count from AppData folder (Path: C:\Users\mine\AppData\Local\Packages) an exception, please see attached image, not sure what is the issue with my code, any clue ?

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,568 questions
XAML
XAML
A language based on Extensible Markup Language (XML) that enables developers to specify a hierarchy of objects with a set of properties and logic.
600 questions
asked 2023-03-08T14:49:58.1766667+00:00
kranthi kumar 206 Reputation points
commented 2023-03-23T17:03:00.84+00:00
kranthi kumar 206 Reputation points
1 answer One of the answers was accepted by the question author.

ContactNameOrder.LastNameFirstName issue

In Windows 11 21H2 Build 22000.1641 it's not possible to set ContactManager.SystemDisplayNameOrder = ContactNameOrder.LastNameFirstName; or ContactManagerForUser.SystemDisplayNameOrder = ContactNameOrder.LastNameFirstName; anymore. Afterwards it is…

Universal Windows Platform (UWP)
asked 2023-03-12T17:31:28.57+00:00
Heiko 781 Reputation points
accepted 2023-03-22T16:53:34.7133333+00:00
Heiko 781 Reputation points
2 answers One of the answers was accepted by the question author.

Is it possible to recognize two commas entered into TextBox?

I am asking for a code that will recognize two commas in one TextBox, so I can use double.Parse with no errors, cleaning one comma.

Universal Windows Platform (UWP)
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,568 questions
asked 2023-03-17T19:46:17.74+00:00
VoyTec 671 Reputation points
accepted 2023-03-22T15:23:59.81+00:00
VoyTec 671 Reputation points
1 answer

Could not create windows.data.pdf.pdfdocument instance for a particular PDF document in UWP Platform

We have been using the PdfDocument API to access the PDF pages and we will convert the pdf pages into Image, to view the page content in our control. However, while creating the PdfDocument instance, we are facing exception and we could see the same…

Universal Windows Platform (UWP)
asked 2020-10-19T04:50:03.11+00:00
Ashok Kumar 1 Reputation point
commented 2023-03-22T13:25:39.94+00:00
Manoj Kumar 21 Reputation points
0 answers

Trying to open a device using HidDevice FromIdAsync in UWP always returns null unless using FileAccessMode.Read

I can confirm that my HID device can have read and write capabilities, because this has been verified in WPF application, where one Endpoint can read and the other can read and write. I thought it might be a permissions issue, but I defined almost every…

Universal Windows Platform (UWP)
asked 2023-02-14T08:32:23.8933333+00:00
Victor Chen 101 Reputation points
commented 2023-03-22T09:44:37.5066667+00:00
Junjie Zhu - MSFT 6,721 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

[UWP] Bugreport: InputInjector injects touches in wrong position in case display is scaled

We are evaluating using the Windows.UI.Input.Preview.Injection namespace to automate testing our UWP (WinUI 2.8) application. We would like to simulate inputs using InputInjector. We tried the sample app available at: …

Universal Windows Platform (UWP)
asked 2023-03-06T07:57:41.7633333+00:00
Zoltan Rajnai 40 Reputation points
accepted 2023-03-22T09:15:25.5066667+00:00
Zoltan Rajnai 40 Reputation points
1 answer One of the answers was accepted by the question author.

[UWP] Bugreport: InputInjector injects touches in wrong position in certain display setup

We are evaluating using the Windows.UI.Input.Preview.Injection namespace to automate testing our UWP (WinUI 2.8) application. We would like to simulate inputs using InputInjector. We tried the sample app available…

Universal Windows Platform (UWP)
asked 2023-03-17T15:57:58.7266667+00:00
Zoltan Rajnai 40 Reputation points
accepted 2023-03-21T08:23:47.1866667+00:00
Zoltan Rajnai 40 Reputation points
0 answers

I have a problem with my media audio player app on windows 11 I'm making on vs argon

I have a problem with my media audio player app on windows 11 I'm making on vs

Universal Windows Platform (UWP)
asked 2023-03-14T05:25:09.8766667+00:00
Luke Ferguson 6 Reputation points
commented 2023-03-17T02:26:26.7433333+00:00
Roy Li - MSFT 28,051 Reputation points Microsoft Vendor
1 answer One of the answers was accepted by the question author.

Windows 11 - Can I toggle SystemNavigationManagerPreview CloseRequested ?

We have an app in the Microsoft store that has the confirmAppClose restricted capability. As a result, when the user puts the app in the background and then tries to close it from the taskbar, nothing happens immediately (the app successfully closes, of…

Universal Windows Platform (UWP)
asked 2023-03-03T14:29:56+00:00
Fiederer, Jens JF 20 Reputation points
commented 2023-03-17T01:25:57.2166667+00:00
Fiederer, Jens JF 20 Reputation points