Thanks for the answer, sorry, my mistake, I copied the wrong converter from the clipboard here. I had this returning Visibility.Visible or Visibility.Hidden, but this did not solve my problem.
The strange thing is that when I do this:
<ListView.ContextMenu> <ContextMenu> <MenuItem Header="{Binding ElementName=loginListView, Path=Items.Count}"/> </ContextMenu> </ListView.ContextMenu>
I get ContextMenu with an empty string, regardless of the ListView elements or not! But in the same form when I do this:
<Button Content="{Binding ElementName=loginListView, Path=Items.Count}" Name="deleteButton" Width="100" Height="30" HorizontalContentAlignment="Center" />
I see that the content of the button changes correctly according to the number of ListView elements! It seems that the ListView should have a different binding, FindAncestor with AncestorType = ListView doesn't work either, and I have no ideas: - (
source share