Search code examples
c#windows-phone-8longlistselector

windws phone 8, how to build a list that mix up list and grid mode with LongListSelector?


hi I'm working for a WP8 application, now I'm going to present a irregular list, for item's template is not unified. Just like a LongListSelector contains list and grid mode in it, seems complex a little bit, can anyone give some sparks?


Solution

  • YOu can have multiple item templates, it is explained here in detail: http://www.geekchamp.com/articles/implementing-windows-phone-7-datatemplateselector-and-customdatatemplateselector

    However if you don't need/want that complex control, then XAML value converters could be the way to go. This way you can customize each item differently based on values from bound classes. http://channel9.msdn.com/Series/Windows-Phone-8-1-Development-for-Absolute-Beginners/Part-25-Advanced-Binding-with-Value-Converters