What a cool feature!! Controling the Windows 8.1 lock screen slide show

Windows 8.1 introduced a really cool feature for users and developers: the control of the lock screen slide show.

Starting with Windows 8, we were already able to define the lock screen background image but now we can do more: we can transform the lock screen into a cool slide show:




I really love this feature and I can spend hours watching beautiful pictures (always from Magic the Gathering) sliding on my screens.


You will see that enabling this feature from your own application is pretty simple!

The LockScreen class

The LockScreen class was introduced with WinRT and Windows 8. Initially, It allowed you to control the lock screen background image with this simple piece of code:

var lockScreen = Windows.System.UserProfile.LockScreen;
lockScreen.setImageFileAsync(file);

Really simple, isn’t it ?

Controling the slide show

Starting with Windows 8.1, the LockScreen is now able to control the slide show feature. It can be activated from the PC Settings screen:

As you can see, your application can provide the content displayed by the lock screen. To do so the following code is used:

Windows.System.UserProfile.LockScreen.requestSetImageFeedAsync(
   new Windows.Foundation.Uri("https://urzagatherer.azure-mobile.net/api/wallpapers")).then(function (result)
    if (result === Windows.System.UserProfile.SetImageFeedResult.success) {
        …
    } else {
        …
    }
});

To control the slide show, Windows 8.1 will use a remote RSS feed provided to requestSetImageFeedAsync function.

Here is an example of the awaited structure of the RSS feed:

<?xml version="1.0" ?>
<rss version="2.0">
<channel>
    <title>UrzaGatherer's Wallpapers</title>
    <link>https://urzagatherer.azure-mobile.net/api/wallpapers</link>
    <description>List of wallpapers published on Magic the Gathering official site</description>
    <pubDate>Wed, 13 Nov 2013 13:48:57 GMT</pubDate>
    <lastBuildDate>Wed, 13 Nov 2013 13:48:57 GMT</lastBuildDate>
    <item>
        <title>Wallpaper Thassa God ofthe Sea 1920x1080</title>
        <link>https://media.wizards.com/images/magic/daily/wallpapers/Wallpaper_Thassa_God_ofthe_Sea_1920x1080.jpg</link>
        <description>Wallpaper Thassa God ofthe Sea 1920x1080</description>
        <enclosure url="https://media.wizards.com/images/magic/daily/wallpapers/Wallpaper_Thassa_God_ofthe_Sea_1920x1080.jpg" type="image/jpg" />
        <pubDate>Sun, 10 Nov 2013 22:00:05 GMT</pubDate>
    </item>
    <item>
        <title>Wallpaper Nylea God ofthe Hunt 1920x1080</title>
        <link>https://media.wizards.com/images/magic/daily/wallpapers/Wallpaper_Nylea_God_ofthe_Hunt_1920x1080.jpg</link>
        <description>Wallpaper Nylea God ofthe Hunt 1920x1080</description>
        <enclosure url="https://media.wizards.com/images/magic/daily/wallpapers/Wallpaper_Nylea_God_ofthe_Hunt_1920x1080.jpg" type="image/jpg" />
        <pubDate>Sun, 10 Nov 2013 22:00:05 GMT</pubDate>
    </item>
    <item>
        <title>Wallpaper Nykthos Shrine to Nyx 1920x1080</title>
        <link>https://media.wizards.com/images/magic/daily/wallpapers/Wallpaper_Nykthos_Shrine_to_Nyx_1920x1080.jpg</link>
        <description>Wallpaper Nykthos Shrine to Nyx 1920x1080</description>
        <enclosure url="https://media.wizards.com/images/magic/daily/wallpapers/Wallpaper_Nykthos_Shrine_to_Nyx_1920x1080.jpg" type="image/jpg" />
        <pubDate>Sun, 10 Nov 2013 22:00:05 GMT</pubDate>
    </item>
</channel>
</rss>

Do not hesitate to add this feature to your application. It is simple to use and integrate and provide a very differentiating value.