Silverlight 4 Data Binding with anonymous types

2019-01-11 03:52发布

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?

1条回答
Deceive 欺骗
2楼-- · 2019-01-11 04:22

You can... If you expose your internals.

Place this in your AssemblyInfo.cs:

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")]
查看更多
登录 后发表回答