1新版本 2优化图片显示
This commit is contained in:
1 parent
41b240c066
commit
a786ba6ce9
2 files changed
+8
-3
No files matched your search
@@ -385,11 +385,16 @@ namespace AllBase
|
||||
}
|
||||
}
|
||||
|
||||
public static BitmapImage LoadBitmipImageFromUrl(string url)
|
||||
public static BitmapImage LoadBitmipImageFromUrl(string url, int? width = 0, int? height = 0)
|
||||
{
|
||||
BitmapImage bitmap = new BitmapImage();
|
||||
if (width != null && height != null)
|
||||
{
|
||||
bitmap.DecodePixelWidth = 100;
|
||||
bitmap.DecodePixelHeight = 100;
|
||||
}
|
||||
|
||||
try
|
||||
try
|
||||
{
|
||||
using (WebClient webClient = new WebClient())
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user