26
我可以使用索引绑定到一个集合项目:WPF通过键绑定到字典中的项目?
<TextBlock FontStyle="Italic" Text="{Binding Path=Exchanges[0].Name}" />
而是使用字典关键是什么?
Path=Exchanges['AMEX'].Name
我可以使用索引绑定到一个集合项目:WPF通过键绑定到字典中的项目?
<TextBlock FontStyle="Italic" Text="{Binding Path=Exchanges[0].Name}" />
而是使用字典关键是什么?
Path=Exchanges['AMEX'].Name
是的..就像一个魅力
<TextBlock FontStyle="Italic" Text="{Binding Path=ExchangesDictionary[AMEX].Name}" />
并没有为我的工作,虽然。当我使用这个Content =“{Binding Path = IconDetails.x}”或Content =“{Binding Path = IconDetails.IconPositionDetails.x}”任何想法时,我的字典就像Dictionary IconDetails并不起作用? –
2012-09-07 14:30:03
这也适用于Indexers。 – KornMuffin 2013-01-18 21:46:36
谢谢。这帮助了很多 – 2016-01-04 21:25:48