niao
niao

Reputation: 5070

WPF List - ListItem Visibility

Greetings, I have a FlowDocument where List control is placed. Inside this list I have some ListItem. Is there any way to set some kind of Visibility for specific ListItem? I don't see a coressponding Property like Visibility for ListItem. When I set fontsize="0.1" then application hangs (it goes into infinite loop).

Upvotes: 0

Views: 843

Answers (1)

Dan Puzey
Dan Puzey

Reputation: 34200

You can set visibility of the ListItem using a binding on the ListItemTemplate, but a better approach would probably be to filter the list that you're binding to. Is there a reason that your list contains items that you don't want to display in the list?

Upvotes: 2

Related Questions