Lists and IsVisible
#1
I have a tv episodes view (based around a list control) where I would like to show some text if there are no episodes displayed (it should be better than just showing an empty space). I thought I would try and do this by checking the Control.IsVisible value for the list.

If I am looking at the view for a tv show that has no episodes then IsVisible returns false and I can display my message. However if I'm looking at a tv show which does have episodes but none are displayed in the list (because of the watched/unwatched filter) then IsVisible returns true.

I can kind of understand why it works like this (the list is not created at all if the show has no episodes I presume?) but would it make sense to also have IsVisible return false if the list is not displaying any items? Alternatively is there another function (such as List.HasItems) that could be used to work out if anything is being displayed or not?
Reply
#2
Container.Content(tvshows)

You can also use files, songs, artists, albums, movies, episodes, and musicvideos.
Reply
#3
Thanks CHI3f but Container.Content(episodes) returns true when viewing a tv show that has no unwatched shows (with the filter set to unwatched). It does return false if there are no episodes at all for a tv show but I would like to show the message any time no episodes are shown in the list (whether it is because of a filter or not).

Would it be possible to have a method like List.HasItems?
Reply
#4
http://www.xboxmediacenter.com/wiki/inde...Conditions

There is a list of all the boolean conditions.
Reply

Logout Mark Read Team Forum Stats Members Help
Lists and IsVisible0