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

Grid row height base TileView content.

1 Answer 26 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 15 Jul 2018, 05:43 PM

I have grid with 2 rows. I want to set first row Height base on how many lines are in RadTileView.

All items should be visible on screen (without scrollbars).

RadTileView items are moved automatically to next line if there is no place in current line.

How can i achieve that?

Sample code:

<Grid>
       <Grid.RowDefinitions>
           <RowDefinition Height="*"/> <!--when RadTileView have more line height should change-->
           <RowDefinition Height="*"/>
       </Grid.RowDefinitions>
       <Grid.ColumnDefinitions>
           <ColumnDefinition Width="*"/>
       </Grid.ColumnDefinitions>
 
       <telerik:RadTileView x:Name="ll"
           HorizontalAlignment="Left"
           VerticalAlignment="Top"
           Grid.Column="0"
           Grid.Row="0"
           ItemsSource="{Binding current, Mode=OneWay}"/>
 
       ...

 

 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 16 Jul 2018, 10:26 AM
Hello Dominik,

You can control the number of rows (lines) and columns in the RadTileView using its RowsCount and ColumnsCount properties. About changing the Height of the RowDefinition, you should be able to achieve your requirement by setting the Height to Auto. You can check this approach in the attached project.

Regards,
Martin Ivanov
Progress Telerik
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Tags
TileView
Asked by
Dominik
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or