Search code examples
silverlight-toolkitwindows-phone-7

Nesting LongListSelector inside LongListSelector - performance problems and other problems


The application contains LongListSelector which shows master items (100-300 elements). When clicked on an item, then it expands and shows details items (100 elements) - which are placed inside nested LongListSelector.

(LongListSelector from Silverlight Toolkit for Windows Phone - August release.)

The problems are:

  1. Performance - expanding details list takes a few seconds which is not acceptable - probably it generates UI controls for all items which is obviously very bad idea
  2. Unable to scroll details items (scrolling master items works OK)
  3. Not working ElementBinding to LayoutRoot.DataContext from LongListSelector.ItemsTemplate

When switching to plain old ItemsControl points 2,3 are solved but still performance problem exist.

Can anybody suggest me any solution or suggestion how these problems can be solved? Thanks!


Solution

  • Having nested scrollable controls is only going to cause problems with them fighting for the input events. It's not a supported scenario in the Metro UI so you'll get no help trying to make it work.

    Change the inner LongListSelector to an ItemsControl. That should get you closer to the experience you're after.