Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change Wallpaper fit for UWP?

Setting the wallpaper is easy enough.

await Windows.System.UserProfile.UserProfilePersonalizationSettings.Current.TrySetWallpaperImageAsync(file);

But I cannot figure out how to set a wallpaper to "span" for example. Is this just not possible for a UWP app?

like image 385
RoboLam Avatar asked Oct 31 '22 09:10

RoboLam


1 Answers

This is a new API since Windows Universal 10 platform, and there is only one parameter(StorageFile) in this method, you can refer to UserProfilePersonalizationSettings class.

Before this, there is no method to set wallpaper for win8.x app. As far as I know, there is no way to set wallpaper as Span fit mode programmatically in UWP app.

Just tested this method, seems it will set the wallpaper to the fit of "Fill" as default.

My suggestion is, you may submit a request to add this new features for developing through the Windows Feedback tool.

like image 147
Grace Feng Avatar answered Jan 04 '23 15:01

Grace Feng