Data Binding to Anonymous Types in Silverlight

Trying to bind Silverlight controls to anonymous typed objects will not work, this is because anonymous types are internal, and Silverlight doesn't support reflecting against internal types.

Sources:

http://dotnetslackers.com/Community/blogs/bmains/archive/2009/04/28/silverlight-accordion-doesn-t-like-anonymous-types.aspx

http://blogs.msdn.com/b/mark/archive/2008/11/18/anonymous-types-and-silverlight-databinding.aspx

A solution to this is to expose your internals to the Binding framework as illustrated here: http://stackoverflow.com/questions/2684954/silverlight-4-data-binding-with-anonymous-types

Comments

Popular posts from this blog

Documentum DQL Query Custom Data Extension For SQL Server Reporting Services

Using taco to create Ionic projects for the Windows platform

Portable Class Library Projects and MVVM Light