1 out of 2 rated this helpful - Rate this topic

LockScreen class

Gets and sets the full-screen image used as the lock screen background.

Syntax


var lockScreen = Windows.System.UserProfile.LockScreen;

Attributes

DualApiPartitionAttribute()
StaticAttribute(Windows.System.UserProfile.ILockScreenStatics, NTDDI_WIN8)
VersionAttribute(NTDDI_WIN8)

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.
SetImageFileAsync Sets the lock screen image from a StorageFile object.
SetImageStreamAsync Sets the lock screen image from a data stream.

 

Properties

The LockScreen class has these properties.

PropertyAccess typeDescription

OriginalImageFile

Read-onlyGets 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

Minimum supported client

Windows 8 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 [Windows Store apps, desktop apps]

Namespace

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

Metadata

Windows.winmd

See also

Lock screen overview
Personalization app sample

 

 

Build date: 12/4/2012

© 2013 Microsoft. All rights reserved.