I have a wpf text block as shown below:
<TextBlock Text="{Binding [someViewModel].SomeVar.SomeSubVar.Name,
TargetNullValue='-'}"/>
On my side of the viewmodel I will have my own logic, which in the end SomeVar.SomeSubVarwill be null.
If I want to show the default value for this TextBlock, I know that I can declare and initiate SomeVar.SomeSubVarand assign the default value to SomeVar.SomeSubVar.Name, but I would like to use instead TargetNullValue. Can I find out which part is wrong?
source
share