Multi-Column List with headers

Aug 18, 2013 at 1:02 PM

Well, it has been a pretty long day for me figuring out how to code a simple Multi-Column List with Headers.

I don't need the List Items to be selectable, they just need to be displayed based on which ObservableCollection<T> items have been added to them and they just get displayed using the binding of the respective Property Name from that collection.

To my surprise there is NO ListView in Windows Phone, so I have to use something else. I taught I'll go ahead with ItemsControl, however, I am unable to understand how to add a Header to each of the columns that I have.

I want the items to be a TextBlock with it's Text Property bound to the Property Name of the Items in the collection.

Please let me know how am I supposed to accomplish this. I can't believe such a simple task cannot be easily accomplished on Windows Phone.

Thanks & Regards,
Aug 18, 2013 at 2:01 PM
Clifford, these discussions should be related to the Coding4Fun toolkit. Questions like this, I suggest hitting up the Windows Phone forums over at or
Basically I think you want a LongListSelector. I'd just do something like a Grid with three Columns with a * width (forces all to be equally sized but dynamic).

If you want to check out how to implement a long list selector, check out the Data Model / Data bound project from Visual Studio (File->New) and that should get you going. also has some videos on LongListSelector as well.
Aug 18, 2013 at 2:46 PM
Thankyou Clint, I posted here since I didn't believe even my previous post related to Data Validation was related to the Coding4Fun toolkit.

I did come across the LongListSelector, however I didn't choose it since it was ultimately a selector and I don't need my list to be selectable.

If there is no other control available to accomplish this simple task except to choose a selector, then I might as well do that for now.

There seems to be a very poor choice of API's (heavily stripped down versions) available to accomplish simple tasks in Windows Phone. I would hope that this situation will change after the Windows Phone Blue Update which promises to bring both Windows 8 and Windows Phone 8 closer in terms of developing apps.

Aug 18, 2013 at 5:07 PM
Edited Aug 18, 2013 at 5:10 PM
Hello Clint,

Finally after 6 hours of hunting around for the right solution on the internet, I found my own custom solution to the problem.

I used the ItemsControl.Template Property to define the layout of my ItemsControl. It is here where I defined my Headers that I needed in a Grid with TextBlocks and the ItemsPresenter, both bundled in a StackPanel.

I then used the ItemsControl.ItemTemplate to bind the various TextBlocks to the respective Properties in the Observable Collection of my View Model. It all worked out perfectly and I am happy that I achieved my ultimate goal of not using the LongListSelector since it was a selector.

Aug 18, 2013 at 8:15 PM
Cliff, being polite here trying to help you. First one thought you honestly wanted a feature added into the toolkit. In the future for stuff like this or if you hit a bump on WinPhone stuff, ask stackoverflow. People tend to respond really quick.

With that, LongListSelector should be used in cases like a ListView. It has the virtualization and performance adjustments you'd need. If you don't want a selection, don't wire it up.

For UX, general guidance is model / view model stuff will transfer over but the view (xaml) you'll have to do some work on between the WinStore and WinPhone.
  • clint
Aug 18, 2013 at 8:57 PM
Clint, I absolutely understand and I apologize for posting my queries in the wrong forum.

I will ensure that I will post developer related queries in either stackoverflow or in the Windows Phone Developer Support Forums in the future.

With all due respect, I appreciate all your help in guiding me in the right direction.

It was just my delight that I got it right using ItemsControl instead of LongListSelector. This is also my first Windows Phone Application development, so I have a few questions to ask.

Although people wouldn't look in this forum for developer related queries with respect to their apps or projects, I still posted the solution that I found, so that if this issue ever pops up in any of the search engines, they will be able to find the solution as well.

Again, thanks for all your help.