抱歉我的英文不好。我試圖結合圖像的列表在列表視圖中的的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