Binding to Dynamic Properties
Sometimes, you need to bind to data that you don't know the structure of at design time, such as XML or JSON data. In this type of scenario, ideally, you'd be able to create an object at runtime that you could deserialize the data to and then bind to it. Silverlight 4 added support for dynamic types, which goes some way toward solving the issue. However, the downside to creating dynamic objects is that you can't actually bind to them, as Silverlight's binding engine doesn't recognize dynamic properties as real properties. Any attempt to bind directly to dynamic properties on objects will fail. To overcome this issue, Silverlight 5 introduced the ICustomTypeProvider
interface that you can implement on a class to tell ...
Get Pro Business Applications with Silverlight 5 now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.