Completed
Last Updated: 18 Jan 2023 12:29 by ADMIN
Release 5.0.0
Allen
Created on: 05 Aug 2022 14:08
Category: ListView
Type: Bug Report
1
ListView: Width not measured correctly when in Grid with ColumnSpacing

I used RadListView in a Grid, Grid has ColumnSpacing, 

for example:

 <Grid
RowSpacing="1"
      ColumnSpacing="1"
      WidthRequest="305"
      HeightRequest="303"
      BackgroundColor="#FF454545">
    <Grid.RowDefinitions>
        <RowDefinition Height="36"/>
        <RowDefinition Height="28"/>
        <RowDefinition Height="82"/>
        <RowDefinition Height="50"/>
        <RowDefinition Height="50"/>
        <RowDefinition Height="50"/>
    </Grid.RowDefinitions>
    <Grid.ColumnDefinitions>
        <ColumnDefinition Width="152"/>
        <ColumnDefinition Width="152"/>
    </Grid.ColumnDefinitions>

    <telerik:RadListView x:Name="listView" Grid.Row="5" Grid.ColumnSpan="2" WidthRequest="305">
        <telerik:RadListView.ItemTemplate>
            <DataTemplate>
                <telerik:ListViewTemplateCell>
                    <telerik:ListViewTemplateCell.View>
                        <Grid BackgroundColor="Gray">
                            <Label Margin="10" Text="{Binding Name}" />
                        </Grid>
                    </telerik:ListViewTemplateCell.View>
                </telerik:ListViewTemplateCell>
            </DataTemplate>
        </telerik:RadListView.ItemTemplate>
    </telerik:RadListView>
</Grid>

I found the RadListView.Width is 304(ColumnDefinition plus), not 305. 

0 comments