Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Grids within ViewCell do not scale height according to Grid height?

$
0
0

When I use a Grid within a ViewCell of a ListView the items won't scale height anymore.

This can happen when, for example, some label within the grid has multi lines. (XAML like below)

`

    <ListView ItemsSource={Binding Items} >
      <ListView.ItemTemplate>
        <DataTemplate>
          <ViewCell >
            <ViewCell.View >
                <Grid>                  
                    <Grid.ColumnDefinitions>
                              <ColumnDefinition Width=120 />
                              <ColumnDefinition Width=Auto />
                    </Grid.ColumnDefinitions>

                    <Label Text={Binding Word}
                       Font=Medium                       
                       />                  
                  <Label Text={Binding Description}
                         Font=Medium
                     Grid.Column=1 />                  
                </Grid>
            </ViewCell.View>
          </ViewCell>
        </DataTemplate>
      </ListView.ItemTemplate>
    </ListView>

`

Any suggestions anyone?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>