Why does AdornedElement.(Validation.Errors).CurrentItem.ErrorContent now (VS2017 15.4) cause intellisense errors?

后端 未结 1 1233
被撕碎了的回忆
被撕碎了的回忆 2020-12-28 21:42

I\'ve been using the following error adorner template for a long time now:



        
相关标签:
1条回答
  • 2020-12-28 22:19

    The ReadOnlyObservableCollection itself doesn't expose a CurrentItem property. Instead, the CurrentItem is a concept of the CollectionView that is internally created when a collection of items is bound in WPF.

    There is some special support to access the CurrentItem of a collection by using / in the binding path.

    Change the binding path to Path=AdornedElement.(Validation.Errors)/ErrorContent to utilize this support.

    0 讨论(0)
提交回复
热议问题