Tile automatically resizing when content change

5 posts, 1 answers
  1. Alex
    Alex avatar
    27 posts
    Member since:
    Oct 2011

    Posted 25 Feb 2012 Link to this post

    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).
  2. Kiril Stanoev
    Admin
    Kiril Stanoev avatar
    1512 posts

    Posted 28 Feb 2012 Link to this post

    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 >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Alex
    Alex avatar
    27 posts
    Member since:
    Oct 2011

    Posted 01 Mar 2012 Link to this post

    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
  5. Answer
    Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 02 Mar 2012 Link to this post

    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 >>
  6. Alex
    Alex avatar
    27 posts
    Member since:
    Oct 2011

    Posted 04 Mar 2012 Link to this post

    It works as expected this way.

    Thank you!

    Alex
Back to Top
UI for WPF is Visual Studio 2017 Ready