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

Tile automatically resizing when content change

4 Answers 245 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 2
Alex asked on 26 Feb 2012, 04:50 AM
Hi,

I use the TileView to display content that can change dynamically. I would like the tiles to adjust to their new content whenever that happens.

Is this possible?

Regards,

Alex

Edit: I realized that the RowHeight property accepted the Auto value. Although my tiles now adjust their height to their content, for some reason a large blank space appears between my tiles (my column count is 1, thus I have 1 tile per row).

4 Answers, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 28 Feb 2012, 10:24 AM
Hello Alexis,

You can use the IsColumnsShrinkEnabled attached property:
<telerik:RadTileView ColumnWidth="Auto" RowsCount="1" telerik:TileViewPanel.IsColumnsShrinkEnabled="True">
    <telerik:RadTileViewItem Header="Item 0">
        <Border Background="LightGreen" Height="300" Width="300" />
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem Header="Item 0">
        <Border Background="LightSalmon" Height="100" Width="100" />
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem Header="Item 0">
        <Border Background="LightSteelBlue" Height="200" Width="100" />
    </telerik:RadTileViewItem>
    <telerik:RadTileViewItem Header="Item 0">
        <Border Background="LightSeaGreen" Height="400" Width="200" />
    </telerik:RadTileViewItem>
</telerik:RadTileView>



Give it a try and let me know if it helps.

Kind regards,
Kiril Stanoev
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Alex
Top achievements
Rank 2
answered on 02 Mar 2012, 05:17 AM
It solves half the problem. When I have two rows, this huge space appears after the content of each row. With IsColumnShrinkEnabled, the column adjusts so that there isn't any free space after the last row. However, the gap remains between the first and the last row.

Regards,

Alexis
0
Accepted
Zarko
Telerik team
answered on 02 Mar 2012, 05:24 PM
Hi,
You can try to set the telerik:TileViewPanel.IsRowsShrinkEnabled property to True and see if this is the behavior you're looking for. You can also read this blog post.
I've attached a sample project so you could examine it and if you have more questions please feel free to ask.

Greetings,
Zarko
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Alex
Top achievements
Rank 2
answered on 05 Mar 2012, 05:58 AM
It works as expected this way.

Thank you!

Alex
Tags
TileView
Asked by
Alex
Top achievements
Rank 2
Answers by
Kiril Stanoev
Telerik team
Alex
Top achievements
Rank 2
Zarko
Telerik team
Share this question
or