Take the 2-minute tour ×

I was wondering if there was a way to share a listbox on the same page.

Basically, I have a listbox that is bound to a collectionviewsource. I also have 5-6 pivot controls that will use the same listbox, but will filter the collectionviewsource differently.

I was wondering if it was possible to say have a listbox as a resource and display it on all hte pivots then when the pivot changes, I can apply a different filter to the collectionviewsource.

Can anyone steer me the right way?


share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

You could create an ItemTemplate for the Pivot which includes the listbox.

I find it easier to maintain this scenario by explicilty creating each pivotItem in XAML but having all teh listboxes share the same ItemTemplate though. I find it easier to see what's going on by just looking and it also makes it easier if you ever need to change the template of one of the listboxes. (I find this seems to happen quite often.)

share|improve this answer
Seems this is the best route. I created a single CollectionViewSource and modified the filter event based on the selected pivot and saw a huge lag. This is definatly the easiest way to manage multiple listbox's with the same style, then just creating a View Source for each list to maintian performance. –  John Aug 11 '11 at 17:24
add comment

Your Answer


