Windows desktop applications
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

LockScreen class

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

Syntax


var lockScreen = Windows.System.UserProfile.LockScreen;

Members

The LockScreen class has these types of members:

Methods

The LockScreen class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
GetImageStream Gets the current lock screen image as a data stream.
RequestSetImageFeedAsync Registers an RSS image feed to be used as a lock screen slideshow. (Windows 8.1 only)
SetImageFileAsync Sets the lock screen image from a StorageFile object.
SetImageStreamAsync Sets the lock screen image from a data stream.
TryRemoveImageFeed Unregisters the image feed being used in the lock screen slideshow, stopping the slideshow. (Windows 8.1 only)

 

Properties

The LockScreen class has these properties.

PropertyAccess typeDescription

OriginalImageFile

Read-only

Gets the current lock screen image.

 

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);

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



IRandomAccessStream imageStream = LockScreen.GetImageStream();

Requirements (Windows 10 device family)

Device family

Desktop, introduced version 10.0.10240.0

API contract

Windows.System.UserProfile.UserProfileLockScreenContract, introduced version 1.0

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.System.UserProfile.UserProfileLockScreenContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Minimum supported phone

None supported

Namespace

Windows.System.UserProfile
Windows::System::UserProfile [C++]

Metadata

Windows.winmd

Attributes

[DualApiPartition()]
[Version(0x06020000)]

See also

Object
Lock screen overview
Personalization app sample
Lock screen personalization sample (Windows 10)

 

 

Show:
© 2016 Microsoft