First off - the UI you are describing is not standard WP behavior. What you need to do is to have a collection of groups.
Your ItemsSource in the outer-listbox you need to bind to the Groups collection:
<LitBox ItemsSource="{Binding Groups}">
Next, inside the ItemTemplate you need to define your expand view, and bind ANOTHER list box to the items of the group. Something like (I am not sure what Expander view you are using, but it will probably be something like this):
<ListBox.ItemTemplate>
<whatever:ExpanderView>
<ListBox ItemsSource="{Binding Items}"/>
</whatever:ExpanderView>
</ListBox>
Now, the reason this is a bad idea is that ListBoxes do not play nice inside other listboxes of the same orientation. At best, you are going to get funky scrolling, at worst you are going to get memory issues since the system will not be able to handle virtualization. To avoid some of the potential scrolling issues, you can also place an ItemsControl with a StackPanel as the panel template. That again could cause issues with memory, depending on how many items you have.
My suggestion is that you change your UI though. One of the these 3 options should be good for you:
- Change the behavior a bit to be a long list selector (similar to the behavior of the Contacts native app). This is not exactly what you want, but is more in line with windows phone guideliens and will give you less head-aches.
- Do this as a 2-phase operation. You have a list of folder, when you tap one of them, a new page opens with the relevant items.
- Another not-so-good but possible solution is to have an ObservableCollection<> that contains just the folders and then add/remove items to it accordingly (making sure to format them correctly - you can use a style or template selector for that)