How do I receive the download progress of a Microsoft Store package? | WinUI/UWP

Anderson Rodrigues Cavalcante 316 Reputation points
2024-10-03T14:36:32.7566667+00:00

Hi.

I'm installing a package from the Microsoft Store from my WinUI application, but I'd like to see the download progress.

I have the following code on Constructor:

PackageCatalog packageCatalog => PackageCatalog.OpenForCurrentUser();

And when I click to download I assign this event:

packageCatalog.PackageInstalling += PackageCatalog_PackageInstalling;

However, this event is only triggered after the download is completed, but I could see the progress by the args. I have the product ID from Microsoft Store and I'd like to monitor the downloading progress.
How can I do that?

Windows App SDK
Windows App SDK
A set of Microsoft open-source libraries, frameworks, components, and tools to be used in apps to access Windows platform functionality on many versions of Windows. Previously known as Project Reunion.
793 questions
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.
11,003 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.