给Image控件后台赋Source值

        //获取根路径
        string rootPath = System.IO.Path.GetDirectoryName(Application.ResourceAssembly.Location); 

b.ImageSource = new BitmapImage(new Uri(rootPath+"Images/pifu2.jpg", UriKind.Relative));

 

posted @ 2012-06-27 14:30  90后1场梦  阅读(257)  评论(0编辑  收藏  举报