redcurry
redcurry

Reputation: 2497

How to make a view invisible to touches?

I have a ContentView where I've applied a custom effect to detect taps on it. I also have a transparent StackPanel that overlays part of it in order to show some buttons on the bottom left and bottom right.

The problem is that taps on the visible part of the ContentView but under the StackPanel are not detected (because the taps are actually on the StackPanel, which doesn't have the custom effect).

Is there a way to make the StackPanel "invisible" to taps or somehow pass the taps through the panel on to the view below it (that is, the ContentView)?

Upvotes: 1

Views: 397

Answers (1)

M. Hamza Rajput
M. Hamza Rajput

Reputation: 10246

This might be your solution. InputTransparent in XAML ( Xamarin.Forms )

<StackLayout InputTransparent="True"/>

This will send the touch effect to the parent view.

Upvotes: 2

Related Questions