抱歉我的英文不好。我试图结合图像的列表在列表视图中的的ItemSource:Binding itemSource ListView in Mode = TwoWay
ItemsSource="{x:Bind ViewModel.Images,Mode=TwoWay}"
In ViewModel I have a list of Images :
public List<Image> Images
{
get { return _images; }
set
{
_images = value;
base.RaisePropertyChanged();
}
}
设置为双向绑定模式,我有以下错误:
Invalid binding path 'View Model.Reports': You can not associate the type 'System.Collections.Generic.List (posytron.epart.uwp.Models.DOM.Report)' to 'System.Object' without a converter
如果我设置结合模式,以单向它的工作原理!
我已经开发了一个转换器来将布尔转换为可见性属性。
转换器应该包含什么?有人能帮我吗?为什么我有这个错误?
谢谢!
请发布ListView xaml和模型类。没有这个,很难给出解决方案 – Archana
@LovetoCode +1,你为什么还需要在Listview中使用TwoWay? – Stamos