It is a simple and frequent, I think, scenario - you bind in XAML a dependency property to property in the viewmodel and later rename the property in viewmodel and forget to rename it in XAML. So is the binding broken.
Is there a way to detect such a broken bindings already at compile time?
you could add the VM-class to your Binding line this:
<DataGrid ItemsSource="{Binding Path=(viewModels:MyViewModel.MyItemsSource)}" />
with:
namespace ViewModels{
public class MyViewModel{
public ICollectionView MyItemsSource {get; set;}
}
}
This shows you BindingErrors at DesignTime
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With