ListView Behaving Incorrectly In WP

DeanChalk.1376DeanChalk.1376 GBMember, University

Hi

I'm developing a Xamarin Forms app, and have a control (button) that floats above a ListView on the page.

However, whenever I tap the button that sits over the ListView (with a higher ZIndex), the ListView still responds to the tap event as if the button covering the ListView wasn't there.

Even if I handle the tap event on the button and set Handled flag to true it has no effect.

Is there any way around this bug

Thanks

Dean

Posts

  • DeanChalk.1376DeanChalk.1376 GBMember, University

    OK, more information

    It looks like there is an assumption in the implementation of Xamarin Forms regarding the ZIndex of the children of a Grid.

    Ordinarily, the ZIndex rises with the order an item has within a parent's Grid's Children collection. So in a scenario where a Grid has 3 children that overlay each other, the last child in the collection has the highest ZIndex, and therefore will received the tap event.

    Xamarin Forms Grid works this way OK

    However, its perfectly reasonable to change the ZIndex's of a Grid's children programatically to bring certain child elements to the forefront. However, this change in ZIndex is not honoured in Xamarin Forms, and the child element that has the lowest ZIndex could still receive tap events if it is still at the end of the child collection.

    This is a bug in Xamarin Forms for Windows Phone

    Any idea about how I should pursue a fix for this - having this work correctly is quite important.

    Thanks

Sign In or Register to comment.