Auto column with minimum width

3 posts, 1 answers
  1. Wenrong
    Wenrong avatar
    36 posts
    Member since:
    May 2012

    Posted 25 May 2012 Link to this post

    I would like my application GUI to be able to scale with the amount of screen estate available. Using a TileView, seems like the only options to control the column width are:
    1. set ColumnsCount of the TileView, which will cause the tile to resize as the view resizes
    2. set ColumnWidth, which gives each column a fixed width regardless of the size of the view, number of column would change according to the view width.

    I quite like the second method, except that it leaves a rather ugly empty void on one side of the TileView.

    Is there an option to either:
    • Cause the tile to stretch similar to when ColumnsCount is set? maybe with a MinimumColumnWidth property... For example, if MinimumColumnWidth=300 and the TileView width is 1100, each of the 3 columns will have the width of 366, and when the TileView has a width of 1200, one more column will appear with width of 300 each.
    • Evenly space the columns across the whole width of the TileView?

  2. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 29 May 2012 Link to this post

    Hello Wenrong,

    The RadTileView doesn't support your layout requirements out-of-the-box, but you can handle the RadTileView.SizeChanged event to implement custom logic controlling the ColumnsCount and the Width of the tiles if needed.

    I attached a sample solution demonstrating a possible approach for implementing the deasribed layout. Please have a look at it and let me know if it works for you.

    All the best,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Wenrong
    Wenrong avatar
    36 posts
    Member since:
    May 2012

    Posted 29 May 2012 Link to this post

    This is awesome. Thanks.
Back to Top