0
是否有可能将某个[]运算符中的值与包含该数组本身的不同数据上下文绑定?XAML绑定索引运算符
我设法让该元素中的正确索引我想这种结合绑定:
Binding DataContext.INDEX_ID, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:UCIndexByClientKeyMeasure}}
如果index_id的给了我正确的整数
,但我不能让这个指数的作品在另一个绑定。我想:
Binding .[{Binding DataContext.INDEX_ID,RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type local:UCIndexByClientKeyMeasure}}}]
当我通过satic值,如:
Binding .[10]
然后,它的工作原理。
感谢
使用MultiBinding。 – Clemens
会说重复的问题:http://stackoverflow.com/questions/4100690/binding-in-wpf-to-element-of-array-specified-by-property – silverfighter