1

This is a follow up to my last question (see code example there and my last comment on the accepted answer). In short, I've got a Multibinding on a WPF DataGridTextColumn to a (home-grown) Person object and a CheckBox. On several computers that I have in the office, it works as expected - the content is altered based on the state of the CheckBox according to my object that implements the IMultiValueConverter interface - but on all four computers tested (so far) in the field, it fails.

The failure appears to be due to a faulty binding, as the object that is passed to the IMultiValueConverter value array has type MS.Internal.NamedObject, which I suspect is the null data binding object, DependencyProperty.UnsetValue (but ToString() didn't give a clearer indication).

Ostensibly, these computers are identically provisioned, though they're not literally from a cloned image. The question I have is what aspect(s) of the hardware and/or platform might possibly lead to a different behavior of the Multibinding? Or what can I try to further investigate the source of the problem? (Disclaimer: I'm pretty much a newbie to WPF and XAML.)

Community
  • 1
  • 1
Michael Repucci
  • 1,633
  • 2
  • 19
  • 35
  • 2
    Perhaps [this post](http://stackoverflow.com/questions/8227083/unable-to-cast-object-of-type-ms-internal-namedobject-to-custom-type) is related? The ultimate cause is a bug in the WPF 4 framework, and there is some workarounds posted on the [official bug report page](https://connect.microsoft.com/VisualStudio/feedback/details/619658/wpf-virtualized-control-disconnecteditem-reference-when-datacontext-switch) – Rachel Mar 20 '14 at 15:01
  • Holy @#$^$!! Thank you! I'd seen that post, but since I had a hard time telling if it was or was not the same issue, I didn't read the bug report. Turns out that installing .NET 4.5.1 fixes the issue. Post a response, and I'll accept it as answer. :) – Michael Repucci Mar 20 '14 at 15:44

1 Answers1

2

I did a search for MS.Internal.NamedObject and came to this post which sounds like it could be related.

The ultimate cause is a bug in the WPF 4 framework related to a virtualized control binding to an ObservableCollection, and changing the DataContext. There is some workarounds posted on the official bug report page, and the easiest solution appears to be to upgrade your version of the framework if you can.

Community
  • 1
  • 1
Rachel
  • 130,264
  • 66
  • 304
  • 490