Xamarin.forms Xamarin使用Media.Plugin形成MVVM(Prism)-如何从设备摄像头获取照片

Xamarin.forms Xamarin使用Media.Plugin形成MVVM(Prism)-如何从设备摄像头获取照片,xamarin.forms,xamarin.android,Xamarin.forms,Xamarin.android,在第页 How to take a picture by the camera and show in display before saving data..... ImageTakeFile2.Source = ImageSource.FromFile(_photo.Path); <Image Source="{Binding Img}"/> 使用: ImageTakeFile2.Source = ImageSource.FromFile(_photo.Path); &

在第页

How to take a picture by the camera and show in display before saving data.....
ImageTakeFile2.Source = ImageSource.FromFile(_photo.Path);
<Image Source="{Binding Img}"/> 
使用:

ImageTakeFile2.Source = ImageSource.FromFile(_photo.Path);
<Image Source="{Binding Img}"/> 

。源必须声明为ImageSource

已解决

ImageTakeFile2.Source = ImageSource.FromFile(_photo.Path);
<Image Source="{Binding Img}"/> 

我不知道你的问题是什么!先生,在保存到数据库之前,我想添加一个新的员工档案,并在图像视图中显示摄像头图片。。。我只有在图像框中显示图像时出现问题。那么如何在ViewModel中显示图像实例我有ImageTakeFile2图像类型。ImageTakeFile2.soure wana要在图像框中显示好的,我不确定ImageTakeFile2对象的类型,但无论如何,属性
Source
和绑定
Source
会因为大小写的不同而有所不同,所以绑定应该看起来像
“{binding ImageTakeFile2.Source}”
,也可以。取决于您的viewmodel。