This is used when the parent view wants to listen to gesture events.
private void OnPanGestureDetected(object source, PanGestureDetector.DetectedEventArgs e)
{
OnPanGesture(e.PanGesture);
+ if(!((SnapToPage && scrollAnimation != null && scrollAnimation.State == Animation.States.Playing) || e.PanGesture.State == Gesture.StateType.Started))
+ {
+ e.Handled = !((int)finalTargetPosition == 0 || -(int)finalTargetPosition == (int)maxScrollDistance);
+ }
}
private void OnPanGesture(PanGesture panGesture)
DragOverShootingShadow(totalDisplacementForPan, panGesture.Displacement.Y);
}
Debug.WriteLineIf(LayoutDebugScrollableBase, "OnPanGestureDetected Continue totalDisplacementForPan:" + totalDisplacementForPan);
+
}
else if (panGesture.State == Gesture.StateType.Finished || panGesture.State == Gesture.StateType.Cancelled)
{
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_GetSuggestedMinimumHeight")]
public static extern float GetSuggestedMinimumHeight(global::System.Runtime.InteropServices.HandleRef jarg1);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Actor_SetNeedGesturePropagation")]
+ public static extern float SetNeedGesturePropagation(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2);
}
}
}
{
private View view;
private LongPressGesture longPressGesture;
+ private bool handled = true;
/// <summary>
/// View the attached view.
longPressGesture = value;
}
}
+
+ /// <summary>
+ /// Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Handled
+ {
+ get => handled;
+ set
+ {
+ handled = value;
+ Interop.Actor.SetNeedGesturePropagation(View.getCPtr(view), !value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
}
}
}
{
private View view;
private PanGesture panGesture;
+ private bool handled = true;
/// <summary>
/// The attached view.
panGesture = value;
}
}
+
+ /// <summary>
+ /// Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Handled
+ {
+ get => handled;
+ set
+ {
+ handled = value;
+ Interop.Actor.SetNeedGesturePropagation(View.getCPtr(view), !value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
}
internal class Property
{
private View view;
private PinchGesture pinchGesture;
+ private bool handled = true;
/// <summary>
/// The attached view.
pinchGesture = value;
}
}
+
+ /// <summary>
+ /// Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Handled
+ {
+ get => handled;
+ set
+ {
+ handled = value;
+ Interop.Actor.SetNeedGesturePropagation(View.getCPtr(view), !value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
}
}
}
{
private View view;
private RotationGesture rotationGesture;
+ private bool handled = true;
/// <summary>
/// The attached view.
rotationGesture = value;
}
}
+
+ /// <summary>
+ /// Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Handled
+ {
+ get => handled;
+ set
+ {
+ handled = value;
+ Interop.Actor.SetNeedGesturePropagation(View.getCPtr(view), !value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
}
}
if (_detectedEventHandler != null)
{
+ e.Handled = true;
//here we send all data to user event handlers
_detectedEventHandler(this, e);
}
{
private View _view;
private TapGesture _tapGesture;
+ private bool handled = true;
/// <summary>
/// The attached view.
_tapGesture = value;
}
}
+
+ /// <summary>
+ /// Gets or sets a value that indicates whether the event handler has completely handled the event or whether the system should continue its own processing.
+ /// </summary>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool Handled
+ {
+ get => handled;
+ set
+ {
+ handled = value;
+ Interop.Actor.SetNeedGesturePropagation(View.getCPtr(_view), !value);
+ if (NDalicPINVOKE.SWIGPendingException.Pending)
+ throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ }
+ }
}
}
}