GestureRecognizer requires a lot of drag to start triggering #29849
Unanswered
Suundumused
asked this question in
General
Replies: 2 comments 1 reply
-
@Suundumused if you are using iOS, you need to calculate StartingX + e.TotalX. Look at this post, it will guide you further. |
Beta Was this translation helpful? Give feedback.
1 reply
-
Instead of the GestureRecognizer, I use <Grid
x:Name="MainTable"
HeightRequest="640"
WidthRequest="480">
<Rectangle
x:Name="Area"
Fill="Crimson"
RadiusX="33"
RadiusY="33"
Stroke="Beige"
StrokeThickness="3" />
<Ellipse
x:Name="AnalogImage"
Fill="DarkSlateGray"
HeightRequest="200"
HorizontalOptions="Center"
Stroke="Beige"
StrokeThickness="3"
TranslationY="{Binding Value, x:DataType=Slider, Source={Reference slider}}"
VerticalOptions="Start"
WidthRequest="200" />
<Slider
x:Name="slider"
HeightRequest="480"
Maximum="440"
Minimum="0"
Opacity="0"
Rotation="90"
WidthRequest="640" />
</Grid> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm creating an analog stick using Pan Gesture Recognizer, basically it's a rectangle with an ellipse inside, where when the user drags with their finger, the ellipse moves in that direction.
The problem is that for the GestureRecognizer wake up, it's necessary to drag it a lot and when it starts the initial value is 10, if you want smaller values you need to drag this to near 0 manually after waking up the recognizer...
In short, this simply ignores reasonably small starting values for it to start detecting.
Video.sem.titulo.Feito.com.o.Clipchamp.5.mp4
My ContentView XAML:
XAML.cs:
Beta Was this translation helpful? Give feedback.
All reactions