TargetException error in Binding to Dictionary<string, object> - by Michael Lemley

Status : 

  External<br /><br />
		This item may be valid but belongs to an external system out of the direct control of this product team.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.

Sign in
to vote
ID 750518 Comments
Status Closed Workarounds
Type Bug Repros 7
Opened 6/22/2012 1:51:58 PM
Access Restriction Public


I have an CLR object with a CLR property of type Dictionary<string, object> 

I attempt to display the property with the XAML:
 <ListView ItemsSource="{Binding MyDictionaryProperty}">
      <DataTemplate >
            <TextBlock Text="{Binding}"/>
            <StackPanel Orientation="Horizontal">
               <TextBlock Text="{Binding Key}"/>
               <TextBlock Text=": "/>
               <TextBlock Text="{Binding Value}"/>
The {Binding} statement resolves to the name of the object:
So I know I have my binding statement defined correctly.
However, the Key and Value statements result in the following errors in Visual Studio debug output below. Is there a workaround for this problem?

An exception of type 'System.Reflection.TargetException' occurred in mscorlib.dll and wasn't handled before a managed/native boundary
** details in Actual Results ** 

Note: originally posted on
Sign in to post a comment.
Posted by StonyUK on 2/26/2013 at 10:15 AM
This is occurring on Windows 8 with Visual Studio 2012 as well.
Posted by Microsoft on 7/2/2012 at 12:11 AM
Thank you for your bug submission. The issue you reported appears to be a Windows issue, and we have forwarded the bug to them. We will close the bug in Connect, as they have now received it in their internal database, and they will evaluate it for the product. If this issue is severe, causing critical business situations or blocking your product development or deployment, please go to <> or call 1-800-MICROSOFT for assistance. For Microsoft premier customers, please contact your administrator, your Technical Account Manager, or your Microsoft premier account representative.

Other Support links -
Posted by Microsoft on 6/25/2012 at 2:15 AM
Thank you for submitting feedback on Visual Studio 2010 and .NET Framework. Your issue has been routed to the appropriate VS development team for investigation. We will contact you if we require any additional information.
Posted by Microsoft on 6/22/2012 at 2:50 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(