TargetNullValue for Visibility that's bound to a boolean
问题 I have a Grid whose Visibility property is bound to a boolean property of a certain model using a Converter : <Grid Visibility="{Binding ElementName=MyTreeView, Path=SelectedItem.MyBoolProperty, Converter={StaticResource boolToVisConverter}}"> <!-- child elements --> </Grid> It works great when an element in my TreeView is selected, but if nothing is selected or the TreeView is empty it defaults to being visible. I need it to be hidden by default. I've tried using TargetNullValue=Hidden but