Custom List View Image Size Shifting

supersteffsupersteff ✭✭Member ✭✭
edited September 23 in Xamarin.Forms

So I have a Custom List View, it keeps shifting image size when I scroll through the image. I have tried using svg files as one blog suggested but that doesn't change the issue at all, here is the code.

<ListView RowHeight="130" x:Name="NewsList" ItemsSource="{Binding CleanList}">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <StackLayout Orientation="Horizontal">
                            <Frame WidthRequest="230" HeightRequest="100" BackgroundColor="#1a6de0" CornerRadius="10">
                                <Label Text="{Binding Newsitem}" FontAttributes="Bold" TextColor="White" LineBreakMode="WordWrap" MaxLines="5" />
                            </Frame>
                                <Frame WidthRequest="60" HeightRequest="100" BackgroundColor="#1a6de0" CornerRadius="10">
                                    <ImageButton BackgroundColor="#004c99"  Command="{Binding BindingContext.DeleteCommand, Source={x:Reference NewsList}}" CommandParameter="{Binding .}"
                                                         Source="delete.svg" HeightRequest="60" WidthRequest="60" VerticalOptions="CenterAndExpand" HorizontalOptions="EndAndExpand" />
                                </Frame>
                            </StackLayout>
                            <ViewCell.ContextActions>
                                <MenuItem Text="GoTo"  Command="{Binding NewsViewCommand}"/>
                            </ViewCell.ContextActions>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>

Best Answer

Answers

  • supersteffsupersteff ✭✭ Member ✭✭

    Will do and when I'm done I'll update this thread, I updated my project and didn't backup before, so now I have to work through a very old version.

  • ColeXColeX Xamurai Member, Xamarin Team Xamurai

    Any updates ?

  • supersteffsupersteff ✭✭ Member ✭✭

    It works, but why would you have to have a work around for something so simple, it doesn't make sense.

Sign In or Register to comment.