Binding problems with VS11

Topics: Bugs, Conventions, Framework Services
Dec 9, 2011 at 5:46 PM
Edited Dec 11, 2011 at 5:49 PM

Hi,

I have just downloaded Visual Studio 11, and am trying out an application that uses CM.  You can use the properties dialog to hook up all sorts of bindings.  You used to be able to do this by setting the design-time data context (d:DataContext), but now you need to create one in XAML like:

<Grid.DataContext>            
  <ViewModels:ShellViewModel />       
</Grid.DataContext>

When I run my app I can see that CM is hooking up the ViewModel to the View and the actions work for button clicks etc, but the bindings do not.  Problem is that when I update a value bound to a TextBox, the UI is not updated to reflect the change to the underlying value.  I can see that CM has bound this control to my property, but the binding is not working.  I have tried manually adding a two-way binding, but it didn't work.  If I remove the above XAML though everything works fine.

From the debug logs CM seems to be hooking everything up as it should.  Any reason why this isn't working?  Perhaps it is a problem with the INPC implementation?

Thanks,
Dan 

[Edit] - On second view this doesn't see to be a problem with only VS11 but with VS2010 also.  But it's more prevalent in VS11 as it looks like d:DataContext is no longer respected, when binding though the property window.