Skip to content
Discussion options

You must be logged in to vote

That's to be expected. The Bindings don't bind to the contents of the collection, they bind to the collection itself. An ItemsRepeater knows what to do when its ItemsSource is given an ObservableCollection to bind to, but the IsVisible property on the TextBlock does not. As the ObservableCollection doesn't change, TextBlock never updates.

One thing you could do is instead bind the TextBlock to MyCollection.Count
If MyCollection is specifically presented as an ObservableCollection I believe they produce Property Changed notifications on the Count property, and so the Binding would update when the count changes.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by shukriadams
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants