LockScreen Class
Definition
Provides properties and methods to manage the full-screen image used as the lock screen background.
public ref class LockScreen abstract sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.System.UserProfile.UserProfileLockScreenContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.ILockScreenStatics, 65536, Windows.System.UserProfile.UserProfileLockScreenContract)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.ILockScreenImageFeedStatics, 65536, Windows.System.UserProfile.UserProfileLockScreenContract)]
class LockScreen abstract final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.System.UserProfile.UserProfileLockScreenContract, 65536)]
/// [Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.ILockScreenStatics, 65536, "Windows.System.UserProfile.UserProfileLockScreenContract")]
/// [Windows.Foundation.Metadata.Static(Windows.System.UserProfile.ILockScreenImageFeedStatics, 65536, "Windows.System.UserProfile.UserProfileLockScreenContract")]
class LockScreen abstract final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.System.UserProfile.UserProfileLockScreenContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.ILockScreenStatics), 65536, typeof(Windows.System.UserProfile.UserProfileLockScreenContract))]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.ILockScreenImageFeedStatics), 65536, typeof(Windows.System.UserProfile.UserProfileLockScreenContract))]
public static class LockScreen
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.System.UserProfile.UserProfileLockScreenContract), 65536)]
[Windows.Foundation.Metadata.DualApiPartition(version=100794368)]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.ILockScreenStatics), 65536, "Windows.System.UserProfile.UserProfileLockScreenContract")]
[Windows.Foundation.Metadata.Static(typeof(Windows.System.UserProfile.ILockScreenImageFeedStatics), 65536, "Windows.System.UserProfile.UserProfileLockScreenContract")]
public static class LockScreen
Public Class LockScreen
- Inheritance
-
LockScreen
- Attributes
Windows 10 requirements
Device family |
Windows Desktop Extension SDK (introduced in 10.0.10240.0)
|
API contract |
Windows.System.UserProfile.UserProfileLockScreenContract (introduced in v1.0)
|
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)
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 |
Gets the current lock screen image. |
Methods
GetImageStream() |
Gets the current lock screen image as a data stream. |
RequestSetImageFeedAsync(Uri) |
Registers an RSS image feed to be used as a lock screen slideshow. (Windows 8.1 only) |
SetImageFileAsync(IStorageFile) |
Sets the lock screen image from a StorageFile object. |
SetImageStreamAsync(IRandomAccessStream) |
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) |