Reputation: 21
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
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