//获取根路径 string rootPath = System.IO.Path.GetDirectoryName(Application.ResourceAssembly.Location);
b.ImageSource = new BitmapImage(new Uri(rootPath+"Images/pifu2.jpg", UriKind.Relative));