且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在 Windows Phone 7 中以编程方式设置锁定屏幕图像?

更新时间:2023-01-24 14:42:17

不要以为你可以直接这样做,但是你可以将图片保存到用户的图片中用户可以在其中选择将图像用作锁定屏幕图像的库:

Don't think you can do this directly, but you can save the image to the user's picture library where the user could then choose to use the image for their lock screen image:

照片、照片、照片 -如何使用 Windows Phone 7 保存、加载和迭代图片

// Saves the WriteableBitmap encoded as JPEG to the Media library.
// The quality for JPEG encoding has to be in the range 0-100,
// where 100 is the best quality with the largest size.
void SaveToMediaLibrary(this WriteableBitmap bitmap, string name, int quality);

// Saves the WriteableBitmap encoded as JPEG to the Media library
// using the best quality of 100.
void SaveToMediaLibrary(this WriteableBitmap bitmap, string name);