Binding to ExpandoObject. PropertyChanged not working

They didn’t add a default mechanism for binding to dynamic objects and instead added a new interface ICustomTypeProvider. And that interface wasn’t added to an ExpandoObject either, but with expando you should be able to use the indexer binding since it is an IDictionary<string, object> that implements INotifyPropertyChanged. <TextBlock Text=”{Binding [Foo]}”/>

Can I serialize an ExpandoObject in .NET 4?

I can’t serialize ExpandoObject, but I can manually serialize DynamicObject. So using the TryGetMember/TrySetMember methods of DynamicObject and implementing ISerializable, I can solve my problem which was really to serialize a dynamic object. I’ve implemented the following in my simple test app: using System; using System.Windows.Forms; using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Collections.Generic; using … Read more

How do I dynamically generate columns in a WPF DataGrid?

Ultimately I needed to do two things: Generate the columns manually from the list of properties returned by the query Set up a DataBinding object After that the built-in data binding kicked in and worked fine and didn’t seem to have any issue getting the property values out of the ExpandoObject. <DataGrid AutoGenerateColumns=”False” ItemsSource=”{Binding Results}” … Read more

Adding unknown (at design time) properties to an ExpandoObject

I wondered how it might be possible to add members to a class “on the fly” and came up with this sample: using System; using System.Collections.Generic; using System.Dynamic; class Program { static void Main() { dynamic expando = new ExpandoObject(); var p = expando as IDictionary<String, object>; p[“A”] = “New val 1”; p[“B”] = “New … Read more

Why can’t I index into an ExpandoObject?

how the Expando was able to hide the method of one of its interfaces. Because as you correctly found out in the documentation, the indexer is an explicit interface implementation. From Explicit Interface Implementation Tutorial: A class that implements an interface can explicitly implement a member of that interface. When a member is explicitly implemented, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)