This is a migrated thread and some comments may be shown as answers.

Auto column with minimum width

2 Answers 141 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Wenrong
Top achievements
Rank 1
Wenrong asked on 25 May 2012, 05:28 AM
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 Answers, 1 is accepted

Sort by
0
Accepted
Tina Stancheva
Telerik team
answered on 29 May 2012, 12:51 PM
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 >>

0
Wenrong
Top achievements
Rank 1
answered on 30 May 2012, 12:20 AM
This is awesome. Thanks.
Tags
TileView
Asked by
Wenrong
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Wenrong
Top achievements
Rank 1
Share this question
or