Resize List View

3 posts, 1 answers
  1. Victor
    Victor avatar
    17 posts
    Member since:
    Jun 2011

    Posted 15 Apr 2015 Link to this post

    Is it possible to resize the listview to the size of it's content?

    I tried using listView.IntrinsicContentSize.Height, but it always returns -1.

  2. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 16 Apr 2015 Link to this post

    Hi Victor,

    You can use the collectionViewContentSize property of TKListView layout property. Consider the sample below:
    CGSize intristicSize = listView.layout.collectionViewContentSize;
    listView.frame = CGRectMake(0, 10, intristicSize.width, intristicSize.height);

    I hope this helps.

    Regards,
    Jack
    Telerik
     

    See What's Next in App Development. Register for TelerikNEXT.

     
  3. DevCraft banner
  4. Victor
    Victor avatar
    17 posts
    Member since:
    Jun 2011

    Posted 16 Apr 2015 in reply to Jack Link to this post

    Works perfectly.  Thanks!
Back to Top