And to a certain degree I can agree with that and if you rely on the data to come from a third party I wouldn’t recommend this approach or at least I would advice you to validate each IEnumerable entry before binding it to the control. For example each IDictionary inside IEnumerable can have different set of keys. You may say that this way I can violate the object constraints. The technique can actually be used not only for Silverlight but also anywhere where you have to transform IDictionary (for example Dictionary or Hashtable, SortedDictionary etc) into anonymous typed object with each dictionary key turned into an object property. If you want to define the number and the type of Silverlight DataGrid columns at runtime you can use the following approach.
0 Comments
Leave a Reply. |