Sunday, April 17, 2011

How to get intellisense when doing XAML data bindings?

It would be nice if in XAML when I define ItemsControl/ItemsSource="{Binding AvailableContracts}" that Visual Studio would be smart enough to go find the property AvailableContracts on the ModelView which the DataContext is bound to, reflect it, and then when I type:

<TextBlock Text="{Binding Path=

it would pop up intellisense of the bindable properties that are available to me in my ContractModelView since AvailableContracts is a List collection.

I don't see why Visual Studio can't go follow this logical path and give me the needed intellisense. Can anyone explain what the disconnect here is? Or surely there is some way to "give it some help" so that it could provide intellisense. Any third-party tools to do this? Perhaps in VS2010? I hear MEF is going to make intellisense much better in VS2010, hope so.

This lack of databinding intellisense when writing my XAML views just feels like notepad. :-(

            <TextBlock Text="{Binding Path=FullName}"/>
            <ItemsControl ItemsSource="{Binding Path=AvailableContracts}">
                        <TextBlock Text="{Binding Path=NEED_INTELLISENSE_HERE
From stackoverflow
  • there is only one good solution for your problem: Resharper


Post a Comment