Try to do following. Create ListBox and bind it's items to big collection. Now set height property of the ListBox to some value. After everything binded and collection filled iterate it's items and request it's indexes. How to do it? Simple. iterate items of ListBox and ask about YouListBox.ItemContainerGenerator.ContainerFromIndex(yourIndex). Check results. What we got? All visible items (± some before and after) has right index, but for all invisible items you'll get null response for this method. What's the problem? Is it bug?
The answer is no - this is feature. ListBox (as well as most of other base controls) do not actually draw invisible items. This is great performance advantage. But what to do if you need indexes of hidden items? Put your control inside ScrollViewer. This way your control will think, that it's fully drawn, but actual output will be partially with scroll bar. But if you doing this, know, that it's not really good idea to draw all items, even when they are invisible.