Hello I want to add some customized gesture (i made) functions on inkcanvas
But I don't know how to do that when the inputdevicetype is touch like this
inkcanvas.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Touch;
when the input device type is touch, then i can't use any gestures
Because the all inputs are recognized the drawn
when using inkcanvas with touch input, can't i use gesture functions?
private void ink1_PointerPressed(object sender, PointerRoutedEventArgs e)
{
PointerDeviceType pointerDevType = e.Pointer.PointerDeviceType;
pointers = new Dictionary<uint, Windows.UI.Xaml.Input.Pointer>();
e.Handled = true;
PointerPoint ptrPt = e.GetCurrentPoint(ink1);
m_pt.Add(ptrPt);
if (!pointers.ContainsKey(ptrPt.PointerId))
{
// Add contact to dictionary.
pointers[ptrPt.PointerId] = e.Pointer;
}
switch (ptrPt.PointerDevice.PointerDeviceType)
{
case Windows.Devices.Input.PointerDeviceType.Mouse:
ink1.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Mouse;
ink1.RightTapped += ink1_RightTapped;
break;
case PointerDeviceType.Touch:
if (m_pt.Count == 2)
{
ink1.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.None;
ink1.RightTapped += ink1_RightTapped;
}
else if (m_pt.Count == 1 || m_pt.Count > 2)
{
ink1.InkPresenter.InputDeviceTypes = Windows.UI.Core.CoreInputDeviceTypes.Touch;
ink1.RightTapped += ink1_RightTapped;
}
break;
}
}
When i press my ink1(inkcanvas) with 2 fingers, then i want to use my gesture functions (draw letter L or tap the inkcanvas 3 times) what i made
such as uwp's doubletapped, righttapped etc.