Issue with DesignInstance


I like the support for the DesignInstance markup extenson in the designer (R# 6, 6.0.2202.688 on VS 10.0.40219.1), but it seems to behave strangely with DataGrids.

I have a pseudo-view model like this:

    public class MainViewModel {

        public ObservableCollection<ChildViewModel> Children { get; set; }

    public class ChildViewModel {

        public string S1 { get; set; }


And a XAML file using both:

    Title="MainWindow" Height="350" Width="525"
    d:DataContext="{d:DesignInstance ViewModel:MainViewModel}"   

        <ListBox ItemsSource="{Binding Path=Children}">

                    <StackPanel Orientation="Horizontal">
                        <TextBlock Text="{Binding Path=S1}" />

        <DataGrid ItemsSource="{Binding Children}">


                <DataGridTextColumn Binding="{Binding Path=S1}" />



The support for DesignInstance is great for the list box. It validates the use of the Children property, as well as the S1 property.

In the case of  DataGrid, it seems to handle either the grid itself or its columns. When the data context is set at the window level, it validates the ItemsSource binding but chokes on the column.
If I set a design data context on the DataGrid, it validates the columns, but I get a warning on the ItemsSource property.

This happens on both Silverlight 4 and WPF 4.

I attach a sample project (don't run it, it does not do anything).

Jean-Marie Pirelli

Comment actions Permalink

I believe your problem highly relates to the issue
We'll definitely fix it by 6.1 Release.
Thanks a lot for your feedback.

Comment actions Permalink

Yes, it seems to be the same problem.


Comment actions Permalink

I have the same problem and have a newer version of Resharper than 6.1.

So the problem is still there. Any suggestions?

Comment actions Permalink

What ReSharper version do you use? Please attach a screenshot of the issue.


Comment actions Permalink

I use Resharper Version Ultimate 2016.1.2.

Below see the used Code (XAML and CS).

The "Name" Property in the DataGridTextColumn is marked from Resharper





Please sign in to leave a comment.