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 it isn't working. I guess I just don't understand how the TargetNullValue property is supposed to work in this situation.
Does anybody have any ideas how to get the functionality I am looking for?