I have a MainViewModel and Customers property (list of CustomerViewModel objects as an ObservableCollection) inside it. I want to bind that list as a ItemsSource to ListView Control. My MainViewModel is bound to Window's DataContext property. I used ServiceLocator pattern in order to create MainViewModel instance which gets an IDataService interface as a parameter in constructor. I used interface to inject data service to MainViewModel and could create some test data for designer in Blend. Everything works fine in Expression Blend, the data is shown correctly but when I run the code ItemsSource is null and no data is bound. The DataContext is correct. When I set DataContext to null and again to MainViewModel instance ItemsSource is set automatically to Customers property. Why doesn't it bind to Customers property automatically when application starts?
<Grid x:Name="LayoutRoot" DataContext="{Binding MainViewModel, Source={StaticResource Locator}}">
<ListView Margin="12" x:Name="customerList"
ItemsSource="{Binding Customers}">
...
</ListView>
</Grid>