Anil Kumar
Anil Kumar

Reputation: 21

Window Store Apps (Windows 10) How to get current desktop wallpaper image?

I am trying set my app background images, same as Windows 10 background image.

How could I get the current wallpaper image in my app ?

I found UserProfilePersonalizationSettings API, which can set the wallpaper but I am trying to get access to the current wallpaper.

Upvotes: 0

Views: 428

Answers (1)

Martin Zikmund
Martin Zikmund

Reputation: 39072

Unfortunately you cannot access the current wallpaper, only set it. If your app sets the wallpaper, you could store it separately to know which one you saved the last time.

If your app requests the Broad filesystem access restricted capability, you could alternatively take a peek in the C:\Users\[username]\AppData\Roaming\Microsoft\Windows\Themes\CachedFiles folder to find the currently set wallpaper image, but declaring this capability is recommended only in case the app has good reason to do so.

Upvotes: 2

Related Questions