Binding to an array element

前端 未结 3 1112
耶瑟儿~
耶瑟儿~ 2020-12-29 10:34

I\'m trying to bind a TextBlock to a specific element in an ObservableCollection. This is what I do right now:

private ObservableCollection arr         


        
3条回答
  •  被撕碎了的回忆
    2020-12-29 11:09

    ObservableCollections do not propagate changes to values stored within objects that belong to the collection. It only fires off the notifications when the content of the collection itself changes (ie. item added, removed, reordered). If you want to make it so that your UI updates when values within the collection changes then you'll have to wire that up yourself separately.

提交回复
热议问题