Ejemplo n.º 1
0
        public override void AwakeFromNib()
        {
            base.AwakeFromNib();

            Slider.ValueChanged += Slider_ValueChanged;

            pinchRecognizer = new UIPinchGestureRecognizer(OnPlotPinch);
            panRecognizer   = new UIPanGestureRecognizer(OnPlotPan);
            panRecognizer.MinimumNumberOfTouches = 2;

            longPressRecognizer = new UILongPressGestureRecognizer(OnPlotLongPress);

            tapRecognizer = new UITapGestureRecognizer(OnPlotTap);
            tapRecognizer.RequireGestureRecognizerToFail(longPressRecognizer);

            Plot.AddGestureRecognizer(pinchRecognizer);
            Plot.AddGestureRecognizer(panRecognizer);
            Plot.AddGestureRecognizer(longPressRecognizer);
            Plot.AddGestureRecognizer(tapRecognizer);
        }