Silverlight 4 Data Binding with anonymous types
Does anyone know if you can use data binding with anonymous types in Silverlight 4? I know you can't in previous versions of silverlight, you can only databind to 开发者_开发技巧public class properties and anonymous type properties are internal.
Just wondering if anyone has tried it in silverlight 4?
You can... If you expose your internals.
Place this in your AssemblyInfo.cs:
[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")]
精彩评论