WPF - How do I default the Visibility of a databound Textblock? WPF - How do I default the Visibility of a databound Textblock? wpf wpf

WPF - How do I default the Visibility of a databound Textblock?


To provide a default value (used when the target of a Binding can't be found) you use the FallbackValue, for example:

Visibility="{Binding Path=IsDownloaded, FallbackValue=Collapsed}"

This should be the case when there is no DataContext.