ImageButton in datatemplate is rendered underneath other elements

I have a desktop app where I'm trying to add an imagebutton. When the image button is displayed, it is underneath it's parent frame (even though it is "inside" the frame tag. If you scroll the item it then renders correctly.

Has anyone else seen this (I'm on the latest build, and this is while testing on Windows 11) 


3 Replies

SY Suthi Yuvaraj Syncfusion Team March 14, 2024 01:44 PM UTC

Hi John Taylor,

We have checked your requirement, we have already faced the issue on Frame in the Android platform, where the touch is not passed to parent , when frame as a child , we have attached the framework bug report for your reference.

Framework Link:
https://github.com/dotnet/maui/issues/7121

We suggest you use Border Control instead of Frame , which will give you the exact UI you expect. Please refer to the code snippet for more reference.

If you are still facing any issue or misunderstood your requirement ,kindly share the below details to reproduce the issue at our end and find the solution as soon as possible.

Code snippet related to Itemtemplate , ImageButton and its related customization

Code Snippet related to SfListView and its related customizations

Platform related details and

Syncfusion nuget version.


Regards,

Suthi Yuvaraj.




JT John Taylor March 15, 2024 09:41 AM UTC

Thank you for the suggestion of using a Border instead of a frame, I will try that.

The issue does however seem to be with the syncfusion list item, as calling the following code in my views .cs redraws the itemtemplate as expected (i.e. the image button gets rendered correxctly)


listView.RefreshItem(idx, idx, true);



SY Suthi Yuvaraj Syncfusion Team March 18, 2024 03:46 PM UTC

John Taylor,

We would like to let you know that, At Initial Loading when the height is not mentioned for ImageButton where the layout call for ImageButton and ListView occurs simultaneously which leads to the rendering issue. Hence we suggest you set proper HeightRequest  and WidthRequest for the imagebutton. We have created a sample with simple item template which contains ImageButton and text , Please have a look at the sample and let us know if you have any concerns,

If you are still facing any issue , Kindly share the details to reproduce the issue and find the solution as soon as possible.


Attachment: ListViewMaui_d3340887.zip

Loader.
Up arrow icon