我想这样做:
imgUser.Source = new Uri(user.Photo);
但我遇到了一个错误,无法将URI转换为ImageSource。有什么帮助吗?
BitmapImage 是ImageSource,可以从URI创建:
imgUser.Source = new BitmapImage(new Uri(user.Photo));