LockScreen LockScreen LockScreen LockScreen LockScreen Class

Definition

Provides properties and methods to manage the full-screen image used as the lock screen background.

public : static class LockScreen
static struct winrt::Windows::System::UserProfile::LockScreen
public static class LockScreen
Public Shared Class LockScreen
// This class does not provide a public constructor.
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.System.UserProfile.UserProfileLockScreenContract (introduced v1)

Examples

This example uses the SetImageFileAsync method of this class to set the lock screen image. The variable file is assumed to be a previously assigned image.

Windows.System.UserProfile.LockScreen.SetImageFileAsync(file);
Windows::Foundation::IAsyncAction MainPage::ExampleCoroutineAsync(Windows::Storage::StorageFile const& file)
{
    co_await Windows::System::UserProfile::LockScreen::SetImageFileAsync(file);
}
using namespace Windows::System::UserProfile;
LockScreen::SetImageFileAsync(file)
Windows.System.UserProfile.LockScreen.setImageFileAsync(file);

This example uses the GetImageStream method of this class to retrieve the lock screen image.

IRandomAccessStream imageStream = LockScreen.GetImageStream();
Windows::Storage::Streams::IRandomAccessStream imageStream{
    Windows::System::UserProfile::LockScreen::GetImageStream()
};
auto imageStream = Windows::System::UserProfile::LockScreen::GetImageStream();

Properties

OriginalImageFile OriginalImageFile OriginalImageFile OriginalImageFile OriginalImageFile

Gets the current lock screen image.

Methods

GetImageStream() GetImageStream() GetImageStream() GetImageStream() GetImageStream()

Gets the current lock screen image as a data stream.

RequestSetImageFeedAsync(Uri) RequestSetImageFeedAsync(Uri) RequestSetImageFeedAsync(Uri) RequestSetImageFeedAsync(Uri) RequestSetImageFeedAsync(Uri)

Registers an RSS image feed to be used as a lock screen slideshow. (Windows 8.1 only)

SetImageFileAsync(IStorageFile) SetImageFileAsync(IStorageFile) SetImageFileAsync(IStorageFile) SetImageFileAsync(IStorageFile) SetImageFileAsync(IStorageFile)

Sets the lock screen image from a StorageFile object.

SetImageStreamAsync(IRandomAccessStream) SetImageStreamAsync(IRandomAccessStream) SetImageStreamAsync(IRandomAccessStream) SetImageStreamAsync(IRandomAccessStream) SetImageStreamAsync(IRandomAccessStream)

Sets the lock screen image from a data stream.

TryRemoveImageFeed() TryRemoveImageFeed() TryRemoveImageFeed() TryRemoveImageFeed() TryRemoveImageFeed()

Unregisters the image feed being used in the lock screen slideshow, stopping the slideshow. (Windows 8.1 only)

See Also