Dela via


LockScreen.GetImageStream Method

Definition

Gets the current lock screen image as a data stream.

public:
 static IRandomAccessStream ^ GetImageStream();
 static IRandomAccessStream GetImageStream();
public static IRandomAccessStream GetImageStream();
function getImageStream()
Public Shared Function GetImageStream () As IRandomAccessStream

Returns

The stream that contains the lock screen image data.

Examples

The following example demonstrates this method being used to retrieve the current lock screen image. For a full sample, see the Lock screen personalization sample (Windows 10).

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

Remarks

This method can be called only by apps that have set the "Picture Library Access" capability in the package manifest or by the app that set this image on the lock screen.

Applies to

See also