Problem with binding to DataContext through dialog in Blend 4

Feb 1, 2011 at 6:21 PM

Hi,

I'm having a problem with the 'blendability' of my app. I'm sure it's my stupid mistake, but I just can't figure this out on my own.

In short, everything works fine in runtime and almost everything works in Blend 4. I have design time services that are correctly imported and I can see design time data provided by the services bound in the controls. The problem is that when I want to bind anything to my ViewModel, the dialog window doesn't show my design time objects. I must write the binding to 'Use a custom path expression' field. If I click on the root object it shows that the DataContext is set as my view model, but still, the dialog doesn't show properties from that view model. Can you tell me what I'm doing wrong?

Best regards,

    - Jussi

Coordinator
Feb 3, 2011 at 7:52 AM

This is a missing feature in Blend. The DataBinding window only works when the DataContext is set via XAML and not injected in Memory. Blend team knows about this limitation and they should be looking at it in future versions of blend. So for now you will need to do the Binding manually via XAML :(

Feb 3, 2011 at 8:16 AM

Ah, okay. That's fine now that I know the situation. And like I said, my mistake! :-)