草庐IT

DisplayedImage

全部标签

c# - 在 WPF MVVM 中绑定(bind)图像

我在将图像绑定(bind)到我的View模型时遇到了一些问题。我终于摆脱了XamlParseException,但图像没有出现。我什至在ViewModel中对图像进行了硬编码。有人可以看到我做错了什么吗?查看:View模型:string_DisplayedImagePath=@"C:\Users\Public\Pictures\SamplePictures\Chrysanthemum.jpg";//string.Empty;int_DisplayedImageIndex;BitmapImage_DisplayedImage=null;publicBitmapImageDisplayed

c# - 在 WPF MVVM 中绑定(bind)图像

我在将图像绑定(bind)到我的View模型时遇到了一些问题。我终于摆脱了XamlParseException,但图像没有出现。我什至在ViewModel中对图像进行了硬编码。有人可以看到我做错了什么吗?查看:View模型:string_DisplayedImagePath=@"C:\Users\Public\Pictures\SamplePictures\Chrysanthemum.jpg";//string.Empty;int_DisplayedImageIndex;BitmapImage_DisplayedImage=null;publicBitmapImageDisplayed