Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Absolute layout two overlapping, active sliders?

$
0
0

Hey, I'm new to xamarin, however trying to create a simple joystick that consists of two sliders inside a absolute layout. One of them is rotated 90° so it can read a y value while the other one reads a x value.
My problem is, that if one of them is overlapping the other, the one in the background doesn't change position when I touch it while the other does.
Is there a way to have both acitve at the same time, is there a better way to achieve my goal?

My first idea would be to deactivate the first slider after it detects that it is touched and then read out the value of the other, however I think there must be a better solution to this.

                <AbsoluteLayout
                    IsVisible="False"
                    x:Name="joystick_xy"
                    HeightRequest="200"
                    WidthRequest="200"
                    HorizontalOptions="Center"
                    VerticalOptions="Start"
                    BackgroundColor="CadetBlue">
                    <Slider WidthRequest="200"
                            HeightRequest="200"/>
                    <Slider Rotation="90"
                            WidthRequest="200"
                            HeightRequest="200"/>
                </AbsoluteLayout>

Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>