dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.17k stars 1.74k forks source link

SwipeItemView Image not showing on first Swipe from within VerticalStackLayout - BindableLayout.ItemTemplate #25235

Open LeoJHarris opened 1 week ago

LeoJHarris commented 1 week ago

Description

I am using a VerticalStackLayout with BindableLayout.ItemTemplate and BindableLayout.ItemsSource="{Binding SwipeViewViewModel}" and populating the SwipeViewViewModel dynamically from my ViewModel but the first time I swipe left the Image never displays, on swiping again then the Image displays.

Steps to Reproduce

Attached sample project

Link to public reproduction project repository

https://github.com/LeoJHarris/SwipeItemView_IconMissing.git

Version with bug

8.0.91 SR9.1

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Android

Affected platform versions

Android 14.0

Did you find any workaround?

No response

Relevant log output

No response

ninachen03 commented 1 week ago

This issue has been verified using Visual Studio 17.12.0 Preview 2.1(8.0.91 & 8.0.3). Can repro this issue at Android platform. Image

dainius-r commented 1 week ago

Maybe duplicate of https://github.com/dotnet/maui/issues/18806

LeoJHarris commented 1 week ago

@dainius-r Looks like it and not limited to VerticalStackLayout only. Also occurs on CollectionView which I have also tested.

kubaflo commented 1 week ago

Hi, @LeoJHarris a possible fix is here https://github.com/dotnet/maui/pull/25397

https://github.com/user-attachments/assets/d58f5de0-6a29-4ade-8805-154775a8bbfb