84 questions with Windows development | WinUI tags

Sort by: Updated
1 answer One of the answers was accepted by the question author.

How to listen to foreground window change safely in WinUI?

Hi community! I'm trying to write a class to get forground window change messages. I think it could get infos such as ClassName correctly. But I found that the app will crash in some cases. And the crash seems only happens when…

Windows development | WinUI
asked 2026-08-20T09:16:08.4866667+00:00
水 知 485 Reputation points
commented 2026-08-20T10:59:10.38+00:00
Danny Nguyen (WICLOUD CORPORATION) 8,725 Reputation points Microsoft External Staff Moderator
4 answers

Implement windows.UpdateTask in WinUI3.0 by registering it in package.appxmanifest file

Hi, Need to implement windows.UpdateTask as background task in WinUI3.0. This task should get triggered whenever the application is updated. But the task should be registered only through Package.appxmanifest file. It should not be registered through…

Windows development | WinUI
asked 2026-08-07T12:16:40.3433333+00:00
Rajendra Rajput 0 Reputation points
commented 2026-08-18T07:03:06.12+00:00
Rajendra Rajput 0 Reputation points
1 answer One of the answers was accepted by the question author.

I'm having trouble achieving tray menu in packaged WinUI app

Hi community! I'm trying to writting an app and here's some trouble about it. I write a WinUI lib using WinForm to achieve tray icon, and I made this tray icon able to react when clicked by mouse. It was working good, I tested it with my new app. Then…

Windows development | WinUI
asked 2026-08-15T12:46:38.5133333+00:00
水 知 485 Reputation points
commented 2026-08-17T08:51:02.7233333+00:00
Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

WinUI 3: How can I detect user interaction with highlighted external controls and advance spoken step-by-step guidance?

Title: WinUI 3: How can I detect user interaction with highlighted external controls and advance spoken step-by-step guidance? Question: I’m developing a Windows desktop application using WinUI 3, Windows App SDK, .NET 8, and Microsoft UI Automation. The…

Windows development | WinUI
asked 2026-08-12T21:45:23.2666667+00:00
Perry Jones 45 Reputation points
commented 2026-08-14T01:22:55.29+00:00
Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

How to set a auto startup for an WinUI app?

Hi community, I'm working with an WinUI app, but it can't auto start. I've declared uap5 and set it as an startup app at task manager, but it just can't work. I found some website about that and they say I should override OnActivated. But there's no…

Windows development | WinUI
asked 2026-08-11T03:25:24.4866667+00:00
水 知 485 Reputation points
commented 2026-08-11T08:06:41.15+00:00
水 知 485 Reputation points
2 answers One of the answers was accepted by the question author.

IME switch can't work smoothly in WinUI3

Hi community! I'm working with a tool to make IME automatically switch to English when switched to serveral apps. I've finished a hardly usable demo but it have some problems. In some cases the IME can't switch back when quitting those specific apps. …

Windows development | WinUI
asked 2026-08-09T16:03:47.26+00:00
水 知 485 Reputation points
commented 2026-08-10T03:16:16.16+00:00
Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

WinUI 3 published unpackaged self-contained app crashes immediately (Microsoft.UI.Xaml.dll 0xc000027b)

Description A brand-new WinUI 3 application crashes immediately after publishing. The same project works correctly in Debug and Release. The problem only occurs with the published application. Environment Visual Studio 2025 18.8.2 .NET SDK 10.0.302 …

Windows development | WinUI
asked 2026-08-06T17:51:54.88+00:00
Nikita Kuptsov 20 Reputation points
commented 2026-08-10T01:43:49.6133333+00:00
Jay Pham (WICLOUD CORPORATION) 4,435 Reputation points Microsoft External Staff Moderator
1 answer

Where is the refresh button?

Where is the refresh button? Why you make everything hard with updates?

Windows development | WinUI
asked 2025-11-03T05:29:30.9566667+00:00
Chandi 0 Reputation points
commented 2026-08-09T21:49:46.9633333+00:00
Len O 0 Reputation points
1 answer One of the answers was accepted by the question author.

My WinUI App is having problem running on x86 and ARM64 platforms

I'm coding an app, it could work properly on x64 platforms. However, when I was trying to publish or debug with x84 and ARM64 presets, it keeps fail to run properly. I referenced H.NotifyIcon and CsWin32, I'm not sure if this problem was triggered by…

Windows development | WinUI
asked 2026-07-23T07:52:25.3366667+00:00
水 知 485 Reputation points
accepted 2026-07-24T02:51:30.9133333+00:00
水 知 485 Reputation points
1 answer

Can I use Fluent Design (WinUI 3 look) in a commercial React/Electron app?

Hi! I'm really impressed by Fluent Design - this language perfectly combines lightness, elegance, and intuitiveness. As a solo dev planning to build independent, commercial web/Electron applications, I'd like their look to closely follow the Fluent…

Windows development | WinUI
asked 2026-07-11T22:04:17.28+00:00
KamilDev 0 Reputation points
commented 2026-07-20T02:51:17.4333333+00:00
Danny Nguyen (WICLOUD CORPORATION) 8,725 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Why Does My Microsoft Store MSIX Show CN=GUID as the Publisher?

I created an .msixupload package for publishing my app to Microsoft Store using the following steps: Right-click the project and select Associate App with the Store. Right-click the project again, choose Create App Packages, and select Create package for…

Windows development | WinUI
asked 2026-06-19T13:37:52.2666667+00:00
Mahdi Hosseini 310 Reputation points
accepted 2026-06-23T07:51:30.35+00:00
Mahdi Hosseini 310 Reputation points
2 answers

How to add support Adding/Removing Item/Items in Xaml in Runtime?

we can easily add/remove items in combobox in runtime like: <ComboBox> <ComboBoxItem/> <ComboBoxItem/> <ComboBoxItem/> </ComboBox> now i want to support current approach in my control. i started with a single…

Windows development | WinUI
asked 2026-06-04T10:20:16.9233333+00:00
Mahdi Hosseini 310 Reputation points
commented 2026-06-16T03:30:23.2166667+00:00
Nancy Vo (WICLOUD CORPORATION) 8,155 Reputation points Microsoft External Staff Moderator
2 answers

WinUI 3 MediaPlayerElement unable to play videos above 8K resolution while WPF can play them after installing K-Lite Codec Pack

Description: We are facing an issue with WinUI 3 when trying to play ultra-high-resolution videos (e.g., 10K, 12K). Environment Windows 11 WinUI 3 (Windows App SDK) MediaPlayerElement HEVC Video Extensions installed Tested with multiple video…

Windows development | WinUI
asked 2026-06-09T10:41:18.6833333+00:00
Satyam Mishra 0 Reputation points
commented 2026-06-15T02:37:44.21+00:00
Nancy Vo (WICLOUD CORPORATION) 8,155 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

How to Track File Change in WinUI?

Hi community! I'm developing a file manager with WinUI3 and C#, and I have a question. I want to add a file track function to automatically update the change of file content or file addition or deletion of a file/folder, or a rename/move action of them.…

Windows development | WinUI
asked 2026-05-25T04:39:57.24+00:00
水 知 485 Reputation points
accepted 2026-05-25T06:49:10.5133333+00:00
水 知 485 Reputation points
2 answers One of the answers was accepted by the question author.

Best practices for handling global hotkeys and custom shortcuts across non-Latin keyboard layouts?

Hi everyone, I'm currently working on a Windows desktop application (using C++ and WinUI 3), and we are building a multi-lingual system for global hotkeys and user-customizable keyboard shortcuts. I'm running into a design blocker when dealing with pure…

Windows development | WinUI
asked 2026-05-08T06:20:10.1233333+00:00
Anumey Sharma 20 Reputation points
accepted 2026-05-11T06:32:06.01+00:00
Anumey Sharma 20 Reputation points
1 answer

Query regarding WinUI2 deprecation plan

We are actively planning to modernize a production app which has UWP backend. Currently, we are not migrating from UWP as some of the core functionalities are getting affected related to web authentication and password vault. So, we are confused between…

Windows development | WinUI
asked 2026-05-04T09:15:02.9666667+00:00
Pragya Gupta 5 Reputation points Microsoft Employee
answered 2026-05-04T10:11:15.5433333+00:00
Nancy Vo (WICLOUD CORPORATION) 8,155 Reputation points Microsoft External Staff Moderator
1 answer One of the answers was accepted by the question author.

Performance issue with Store update APIs - AppInstallManager and StoreContext

I'm experiencing slow response times when checking for app updates in my Windows Service application using Microsoft Store APIs. The affected APIs are AppInstallManager.SearchForUpdatesAsync() and…

Windows development | WinUI
asked 2026-04-06T23:33:35.19+00:00
Diogo Costa Maranhao Rodrigues 120 Reputation points
accepted 2026-04-07T12:03:47.6666667+00:00
Diogo Costa Maranhao Rodrigues 120 Reputation points
1 answer One of the answers was accepted by the question author.

How can I download a package flight bundle programmatically?

I'm developing a Packaged Windows Service which is available on the Microsoft Store. Now I need to download the package flight bundle associated with the current logged account to perform a installation/update. How can I implement this? Running in…

Windows development | WinUI
asked 2026-03-24T13:30:26.6633333+00:00
Diogo Costa Maranhao Rodrigues 120 Reputation points
accepted 2026-03-31T10:27:19.74+00:00
Diogo Costa Maranhao Rodrigues 120 Reputation points
2 answers

how to get a msix file for Windows App Runtime 1.7

I have tried to use CoPilot to help me to use the correct MSIX file to provision the correct runtime in a multiuser environment

Windows development | WinUI
asked 2026-03-24T15:18:14.57+00:00
Mikael MW. Wallinder 0 Reputation points
commented 2026-03-30T08:44:47.7433333+00:00
Jack Dang (WICLOUD CORPORATION) 18,975 Reputation points Microsoft External Staff Moderator
2 answers One of the answers was accepted by the question author.

WinUI3 Webview2 is not working in non-admin mode

Hi In WPF .netframework based application , i use to create separate user data folders for different users and pass that to my webview2 environment while creating webview2 object. It works fine. But with WinUI3 , i am doing the same thing but my…

Windows development | WinUI
asked 2026-03-25T11:57:54.52+00:00
Vishal2 Bansal 350 Reputation points
accepted 2026-03-27T10:21:53.5433333+00:00
Vishal2 Bansal 350 Reputation points