FallbackValue used if the binding source path is not resolved, if the converter fails, or if the value is not valid for the property type.
It will not be used if null returned, if null not valid for this type of property. In this case, the DataTrigger will not DataTrigger . You can use TargetNullValue for this case.
<DataTrigger Binding="{Binding MyList.Count, FallbackValue=0, TargetNullValue=0}" Value="0"> <Setter Property="Visibility" Value="Collapsed"></Setter> </DataTrigger>
source share