I have a wpf textblock as below:
<TextBlock Text="{Binding [someViewModel].SomeVar.SomeSubVar.Name,
TargetNullValue='-'}"/>
At my viewmodel side, I'll have my own logic that in the end, SomeVar.SomeSubVar
will be null.
If I want to show a default value for this TextBlock
I know I can declare and initiate SomeVar.SomeSubVar
and assign default value into SomeVar.SomeSubVar.Name
but I would like to use TargetNullValue
instead. May I know which part is wrong?