Get Icon from UWP App

后端 未结 3 1880

I want to extract the icon of an UWP App to build a Explorer like \"Open With\" menue.

With the help of SHAssocEnumHandlers i managed to get the associated applications

3条回答
  •  无人及你
    2021-02-08 15:57

    UWP apps (or Windows Store apps, or apps in what's called sometimes the "AppX application model") information can be queried from official APIs.

    These APIs don't have a C# equivalent AFAIK but I've provided sample code to do this in my answer to a similar question here on SO: Getting icon of “modern” Windows app from a desktop application?

    The sample application dumps all current loaded Windows Store packages & apps.

    Note there is not just one icon for a UWP app, there may be many, to be able to adapt to a specific device, form factors, etc. The sample code has a utility that gets the highest scale image for a given resource.

提交回复
热议问题