locked
Make ListView items expand to display all their contents like table items?

    Question

  • I can have some fairly long texts in my listview items and wonder if the listview (in ListView layout) can adapt to these long items and expand its width on the fly like a table behaves?
    Tuesday, June 03, 2014 9:17 AM

Answers

  • Consider that about anything that can be done in javascript is possible in WinRT/JS.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, June 03, 2014 7:08 PM
    Moderator

All replies

  • Consider that about anything that can be done in javascript is possible in WinRT/JS.

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Tuesday, June 03, 2014 7:08 PM
    Moderator
  • Well, any suggestions on the CSS required to make listview items expand in width to fit their text content?
    Wednesday, June 18, 2014 10:45 PM
  • I think you want to read this:

    By default, the ListView allocates the same size cell for each item it contains. Here's a ListView that contains items that all have the same size.

    http://msdn.microsoft.com/en-us/library/windows/apps/jj657974.aspx

    That said, do you have a sample of what you want to show so I can try to adapt a template to fit your needs?


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, June 23, 2014 7:10 PM
    Moderator