locked
ListView with a Header, any way to freeze it? RRS feed

  • Question

  • I am using ListView to simulate a grid, I added a header to describe the "columns". It's fine, but when there are many items in a ListView, Header scrolls away. Is there another way than to place the Grid that implements the Header outside the ListView? I modified the original SplitApp project to be sure something from my code is interfering. It behaves the same. Thanks. 
    Friday, September 6, 2013 9:33 PM

Answers

  • Hi Ivan,

    Yes, place a header outside is a good option, there is no exist API for freezing a header. 

    Another idea is you could create a user control which contains a Header and a ListView, by this way scrolling the ListView will not effect the Header Line.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by IvanIL Monday, September 9, 2013 9:42 AM
    Monday, September 9, 2013 1:27 AM
    Moderator
  • Hm, I probably misunderstood. It's a header (and footer) of the items and not the control itself, so placing my "header" outside is the correct way... 
    • Marked as answer by IvanIL Monday, September 9, 2013 9:42 AM
    Friday, September 6, 2013 9:56 PM

All replies

  • Hm, I probably misunderstood. It's a header (and footer) of the items and not the control itself, so placing my "header" outside is the correct way... 
    • Marked as answer by IvanIL Monday, September 9, 2013 9:42 AM
    Friday, September 6, 2013 9:56 PM
  • Hi Ivan,

    Yes, place a header outside is a good option, there is no exist API for freezing a header. 

    Another idea is you could create a user control which contains a Header and a ListView, by this way scrolling the ListView will not effect the Header Line.

    Best Regards,

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by IvanIL Monday, September 9, 2013 9:42 AM
    Monday, September 9, 2013 1:27 AM
    Moderator
  • Hi James,

      Thanks for the info. I thought it would be so. I come from WPF development and I already learnt that sometimes things with the same name do not do the same things in WinRT as they do in WPF.

    Ivan


    • Edited by IvanIL Monday, September 9, 2013 6:53 AM
    Monday, September 9, 2013 6:53 AM