开发者

Silverlight 4 Data Binding with anonymous types

开发者 https://www.devze.com 2022-12-28 04:33 出处:网络
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 properti

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")]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号