コード例 #1
0
		public void RemoveRecognizer (BaseNativeGestureRecognizer recognizer)
		{
			NativeRecognizers.Remove (recognizer);
			if (GroupRecognizers.Contains (recognizer.Recognizer)) {
				GroupRecognizers.Remove (recognizer.Recognizer);
			}
		}
コード例 #2
0
 public void RemoveRecognizer(BaseNativeGestureRecognizer recognizer)
 {
     NativeRecognizers.Remove(recognizer);
     if (GroupRecognizers.Contains(recognizer.Recognizer))
     {
         GroupRecognizers.Remove(recognizer.Recognizer);
     }
 }
コード例 #3
0
		public void AddRecognizer (BaseNativeGestureRecognizer nativeRecognizer)
		{
			NativeRecognizers.Add (nativeRecognizer);
			if (nativeRecognizer.Recognizer.View != TargetView) {
				throw new InvalidOperationException ("tried to add recognizer to gesture coordinator that is associated with a different view");
			}
			nativeRecognizer.NativeView = _nativeView;
			var formsRecognizer = nativeRecognizer.Recognizer;
			if (formsRecognizer.IsConsumingTouchesInParallel) { // && formsRecognizer.View is Xamarin.Forms.Layout<Xamarin.Forms.View>) {
				GroupRecognizers.Add (formsRecognizer);
			}
		}
コード例 #4
0
        public void AddRecognizer(BaseNativeGestureRecognizer nativeRecognizer)
        {
            NativeRecognizers.Add(nativeRecognizer);
            if (nativeRecognizer.Recognizer.View != TargetView)
            {
                throw new InvalidOperationException("tried to add recognizer to gesture coordinator that is associated with a different view");
            }
            nativeRecognizer.NativeView = _nativeView;
            var formsRecognizer = nativeRecognizer.Recognizer;

            if (formsRecognizer.IsConsumingTouchesInParallel && formsRecognizer.View is Xamarin.Forms.Layout <Xamarin.Forms.View> )
            {
                GroupRecognizers.Add(formsRecognizer);
            }
        }