zoukankan      html  css  js  c++  java
  • Image source 赋值问题

    http://bbs.csdn.net/topics/390120529

    最后通过这种方式实现 
     string url = carInfo.NetworkPath + carInfo.FileSource.First;
     // url:http://localhost/ITSImages/20120625/01/192168010176/卡口抓拍/皖J21742.jpg
                    Uri uri = new Uri(url);
                    WebClient w = new WebClient();
                    w.OpenReadCompleted += (sender, e) =>
                   {
                       if (e.Error == null)
                       {
                           BitmapImage bitImg = new BitmapImage();
                           bitImg.SetSource(e.Result);                       this.SSCX.pic.Source = bitImg;
                     
                       }
                       // else 
                       // this.SSCX.pic.Source ="本地图片";
                   };
                    w.OpenReadAsync(uri);


  • 相关阅读:
    简单记录下springboot+jms+activemq
    简单记录下RestTemplate 中postForObject调用例子
    vue+springboot后台实现页面按钮权限
    发送短信功能
    drf
    drf
    drf
    drf
    drf
    drf
  • 原文地址:https://www.cnblogs.com/xlyg-14/p/4274122.html
Copyright © 2011-2022 走看看