In my Windows Store app I have a list populated with ExpandoObjects. Data binding works fine for the initial values, but not for an image property I set asyncronously after a file has been downloaded:
public static async void Set<T>(this ExpandoObject thisObject, string property, Func<Task<T>> setter) {
var expando = thisObject as IDictionary<string, Object>;
if (!expando.ContainsKey(property)) {
expando.Add(property, null);
}
expando[property] = await setter.Invoke();
}
Hooking up to the PropertyChanged event on the ExpandoObject confirms that it is fired for all objects. The new property is attached to the object and the value is correct, but the items in the ListView are not updated in full.
The list contains 14 objects. If I use regular typed objects instead of ExpandoObjects and use the same async setting of the image property, some of the 14 objects gets updated in the view (the ones not currently visible). If I implement INotifyPropertyChanged in the class all 14 gets updated. Using ExpandoObjects I get the exact behaviour as with the typed objects without INPC: items not currently visible are updated.
So it seems that PropertyChanged is not working with ExpandoObject and data binding.
It workds as intended in WPF, but not in a Store App. See comparison: https://sites.google.com/site/moramatte/ExpandoComparison.zip?attredirects=0&d=1