Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 15342 [details]
PinchGestures don’t seem to work as well when the element is inside a StackLayout compared to a Grid. You can reproduce the issue using the modified PinchGesture sample that is attached.
The StackLayout seems to decrease the size of the target area for the gesture to be recognized. In my testing, the issue appeared more noticeable on iOS, but I also experienced it on Android
### Steps to Reproduce
1. Run the attached repro project
2. Select the “StackLayout” tab
3. Pinch out to zoom the image. Zoom in quite a bit.
4. Pinch in to zoom out
### Expected Results
The image will zoom out.
### Actual Results
It is difficult to get the container to recognize the pinch gesture to zoom out than it is to zoom in. It feels like there is a small target area that the pinch gesture must begin in for it to be recognized, mostly centered on the screen. So if try to do the gesture near the corners, it doesn’t work.
This is in contrast to when the container is in a Grid. Then you could pinch anywhere on the screen and the gesture will be recognized and the experience is more fluid. This is demonstrated in the “Grid” and “ContentView” tabs.
### Environment Info
Tested on Forms 2.1
The problem is the way the stacklayout was positioned meaning the PinchToZoomContainer was not consuming the entire page.
var StackPage = new ContentPage
Title = "StackLayout",
Content = new StackLayout
Padding = new Thickness(0),
VerticalOptions = LayoutOptions.FillAndExpand,
Content = new Image
Source = ImageSource.FromFile("oasis.jpg"),
//WidthRequest = 200,
//Aspect = Aspect.AspectFit