ListView: button image makes item disappear.

ahmedJalal99ahmedJalal99 Member ✭✭

i have this ListView:

<ListView x:Name="activityListView" RowHeight="360" SeparatorVisibility="None" AbsoluteLayout.LayoutBounds="1,1,1,1" AbsoluteLayout.LayoutFlags="PositionProportional,WidthProportional,HeightProportional"> <ListView.ItemTemplate> <DataTemplate> <ViewCell> <StackLayout Margin="15" VerticalOptions="FillAndExpand"> <Frame Margin="10" BorderColor="#e0e0e0" CornerRadius="20" BackgroundColor="#eeeeee"> <StackLayout Orientation="Vertical" Margin="-14"> <StackLayout Margin="5" VerticalOptions="Start" BackgroundColor="Teal"> <Label Text="{Binding _Name}" HorizontalOptions="Start" FontSize="22" FontAttributes="Bold" TextColor="White" Margin="10,10,0,10" /> </StackLayout> <StackLayout BackgroundColor="#eeeeee" Orientation="Vertical" Margin="0,-6,0,0"> <Label Text="عنوان النشاط" FontSize="14" FontAttributes="Bold" Margin="0,12,5,0" TextColor="Teal" HorizontalOptions="Center" /> <Image Source="world.png" /> <Label FontAttributes="Bold" Text="{Binding _IP}" TextColor="Teal" FontSize="14" Margin="0,0,0,0" HorizontalOptions="Center" /> <BoxView HeightRequest="1" BackgroundColor="Teal" Margin="25,35,25,0" /> </StackLayout> <StackLayout BackgroundColor="#eeeeee" Margin="0,-6,0,0" Orientation="Horizontal"> <Button BorderWidth="1" BorderColor="Teal" x:Name="buttonDelete" FontSize="16" Text="حذف" TextColor="Teal" HorizontalOptions="FillAndExpand" CornerRadius="20" Margin="10,20,0,10" FontAttributes="Bold" Clicked="DeleteActivity" BackgroundColor="White"/> <Button BorderWidth="1" BorderColor="Teal" x:Name="buttonEdit" FontSize="16" Text="تعديل" TextColor="Teal" HorizontalOptions="FillAndExpand" CornerRadius="20" Margin="0,20,10,10" FontAttributes="Bold" Clicked="EditActivity" BackgroundColor="White" /> </StackLayout> </StackLayout> </Frame> </StackLayout> </ViewCell> </DataTemplate> </ListView.ItemTemplate> </ListView>

my problem is when i add the Image or ImageSource property to the Button controls some or sometimes all of the ListView items disappear when scrolling up and down quickly.
however this only happens on Android there are no issues on ios.

can anyone help me with this issue?

Best Answer

  • ahmedJalal99ahmedJalal99 ✭✭
    Accepted Answer

    thank you for your answer #yelinzh but it's fine now the problem is solved within the new Xamarin.Forms update

Answers

Sign In or Register to comment.