Wpf Resource: "Unknown Build Error, 'Path cannot be null..."
- by Femaref
The following is a snippet from a xaml defining a DataGrid in a Control, defining a template selector.
<DataGrid.Resources>
<selector:CurrencyColorSelector x:Key="currencyColorSelector">
<selector:CurrencyColorSelector.NegativeTemplate>
<DataTemplate>
<TextBlock Text="{Binding Balance, StringFormat=n}" Background="Red"/>
</DataTemplate>
</selector:CurrencyColorSelector.NegativeTemplate>
<selector:CurrencyColorSelector.NormalTemplate>
<DataTemplate>
<TextBlock Text="{Binding Balance, StringFormat=n}"/>
</DataTemplate>
</selector:CurrencyColorSelector.NormalTemplate>
</selector:CurrencyColorSelector>
</DataGrid.Resources>
Now, an error is thrown: "Unknown build error, 'Path cannot be null. Parameter name: path Line 27 Position 79.'" (Compiler or xaml validation error).
I have no idea where this Path comes from, neither does my example show anything of it. If you doubleclick the error, it points to the end of the first line.
Did anybody encounter such a problem and has a solution for it? The example was from here: http://www.wpftutorial.net/DataGrid.html (Row Details depending on the type of data)