I have developed a C# app that overrides the PreviewMouseUp, PreviewMouseMove, and PreviewMouseDown events in some custom controls to allow scrolling a scroll viewer by clic
What you can do is to use the same method for both, something like this:
protected override void OnPreviewMouseUp(MouseButtonEventArgs e)
{
OnPreviewTouchMouseUp(e);
}
protected override void OnPreviewTouchUp(TouchEventArgs e)
{
OnPreviewTouchMouseUp(e);
}
private void OnPreviewTouchMouseUp(EventArgs e)
{
}
The only difference will be the way you get the coordinates of the mouse/touch:
For touch:
e.GetTouchPoint(this).Position;
For mouse:
e.GetPosition(this);