SOURCE CODE:
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Input;
using Xamarin.Forms;
namespace Test
{
public class TouchEffect : RoutingEffect
{
public event TouchActionEventHandler TouchAction;
public TouchEffect() : base("Test.TouchEffect")
{
}
public bool Capture { set; get; }
public async void OnTouchAction(Element element, TouchActionEventArgs args)
{
TouchAction?.Invoke(element, args);
}
}
}
XAML:
<ContentPage.Effects>
</ContentPage.Effects>
effect shows TouchAction event handler how to convert it into bindable event so that we can use it like below
<ContentPage.Effects>
</ContentPage.Effects>