NOT! Logic
Showing posts with label
Bindings
.
Show all posts
Showing posts with label
Bindings
.
Show all posts
Thursday, 30 June 2011
WPF Binding to a Dictionary
Found this useful tip recently. You can bind a WPF control to any indexed property, including dictionaries.
DataMemberBinding="{Binding MyDict[MyKey]}"
This caught me out because the syntax is very C# and I use VB.Net.
You can also do this programmatically.
DataMemberBinding = New Binding("MyDict[MyKey]")
Older Posts
Home
Subscribe to:
Posts (Atom)