ListView does not resize itself after an item is invisible

3 posts, 0 answers
  1. Unb
    Unb avatar
    16 posts
    Member since:
    Oct 2018

    Posted 26 Nov 2018 Link to this post

    We have a list and by choosing a value, we hide some list items. The items become invisible, there is no problem but occupied places by items stay still after we set invisible. We use MVVM and this part works fine and we bind a property for IsVisible and it seems it works too. Only problem here, the list does not invalidate/refresh itself to re-arrange the view.

     I do not know why but I cannot attached the pictures..

    So here is the my list

    and here, after we made some invisible items..

    I realize something.. After we set Invisible, the height of the custom control is still 37, and HeightRequest and MinimumHeightRequest are -1. I tried to change -1 to 0 but nothing changed.


    Here is our listview Code and binding.,


    <datacontrols:RadListView x:Name="listView" Grid.Row="1"  ItemsSource="{Binding FlatSource}"
                                                         SelectionMode="None" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand"
                                                         PropertyChanged="listView_PropertyChanged" >
                                       <telerikListView:PropertyGroupDescriptor PropertyName="GroupName" />
                                           <Grid BackgroundColor="{StaticResource CustomBaseGrayColor}" Margin="0,5,0,0">
                                                   <ColumnDefinition Width="Auto" />
                                                   <ColumnDefinition />
                                               <Label Text="▸" Margin="8, 9, 0, 3" TextColor="{StaticResource CustomBlackTextColor}" FontSize="Medium">
                                                       <DataTrigger TargetType="Label" Binding="{Binding IsExpanded}" Value="True">
                                                           <Setter Property="Text" Value="▾" />
                                               <Label Text="{Binding }"  Margin="0, 11, 0, 3" Grid.Column="1"  HorizontalOptions="Start" Style="{StaticResource GrouppingTitle}"   />
                                                   <Grid BackgroundColor="{StaticResource CustomBaseGrayColor}" ColumnSpacing="0"  VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand">
                                                           <ColumnDefinition Width="10"/>
                                                           <ColumnDefinition Width="*" />
                                                       <BoxView Color="{StaticResource CustomBlackTextColor}" Grid.Column="0" VerticalOptions="FillAndExpand" WidthRequest="10" />
                                                   <customCellItem:ThreeColumnCellItem Grid.Column="1"                                       
                                               KeyLabelText="{Binding ParamName}"
                                               ValueLabelText="{Binding CurrentValue}"
                                               ModifiedValueEntryText="{Binding NewValue}"
                                               DataItem ="{Binding DataItem}"       
                                               FieldParamType="{Binding ParamType}"   
                                               HorizontalOptions="Fill" VerticalOptions="Fill"
                                               IsVisible="{Binding IsVisible}"
                                               IsEnabled="{Binding !IsReadOnly}"


    Normally ListView from Xamarin.Forms has a property HasUnevenRows. I believe that It may work but RadListView has not this property.

    Thank you in advance.




  2. Unb
    Unb avatar
    16 posts
    Member since:
    Oct 2018

    Posted 30 Nov 2018 in reply to Unb Link to this post

    the problem has not been solved yet. Is there any idea?
  3. Unb
    Unb avatar
    16 posts
    Member since:
    Oct 2018

    Posted 03 Dec 2018 in reply to Unb Link to this post



Back to Top