Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 535
Anthony Avatar asked Apr 21 '10 17:04

Anthony


1 Answers

You can... If you expose your internals.

Place this in your AssemblyInfo.cs:

[assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System.Windows")]
like image 104
Jason Jarrett Avatar answered Oct 07 '22 15:10

Jason Jarrett