mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-14 11:39:16 +08:00
Merge pull request #427 from lances101/bugfix-397
Bugfix for issue #397
This commit is contained in:
commit
d87317f937
@ -425,7 +425,12 @@ namespace Wox
|
|||||||
var wallpaper = WallpaperPathRetrieval.GetWallpaperPath();
|
var wallpaper = WallpaperPathRetrieval.GetWallpaperPath();
|
||||||
if (wallpaper != null && File.Exists(wallpaper))
|
if (wallpaper != null && File.Exists(wallpaper))
|
||||||
{
|
{
|
||||||
var brush = new ImageBrush(new BitmapImage(new Uri(wallpaper)));
|
var memStream = new MemoryStream(File.ReadAllBytes(wallpaper));
|
||||||
|
var bitmap = new BitmapImage();
|
||||||
|
bitmap.BeginInit();
|
||||||
|
bitmap.StreamSource = memStream;
|
||||||
|
bitmap.EndInit();
|
||||||
|
var brush = new ImageBrush(bitmap);
|
||||||
brush.Stretch = Stretch.UniformToFill;
|
brush.Stretch = Stretch.UniformToFill;
|
||||||
PreviewPanel.Background = brush;
|
PreviewPanel.Background = brush;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user