I have the following XAML:
<DataGrid ItemsSource="{Binding Path=FilteredPatients}" SelectedItem="{Binding Path=SelectedPatient}">
<DataGrid.Columns>
<DataGridTextColumn Header="Name"
Binding="{Binding Path=FormattedName}" />
<DataGridTextColumn Header="Date of Birth"
Binding="{Binding Path=BirthDate} />
<DataGridTextColumn Header="Gender"
Binding="{Binding Path=Gender} />
<DataGridTextColumn Header="Id"
Binding="{Binding Path=Id}" />
</DataGrid.Columns>
</DataGrid>
Resharper determines that FilteredPatients and SelectedPatient are ok based on the DataContext of the parent control. However, FilteredPatients is an ICollectionView and thus Resharper cannot figure out that it contains instances of Patient, which has the properties specified in the DataGrid column bindings.
Everything works fine at runtime, so how do I tell Resharper the type of item contained by FilteredPatients?