Skip to content

nor0x/TouchTracking.MAUI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TouchTracking.MAUI 👆

.NET

TouchTracking provides unified API for multi-touch gestures in .NET MAUI. It is a hard-fork of TouchTracking.Forms upgraded to .NET MAUI - it has a similar API and functionality as the original library.

Usage

Install the Plugin.MAUI.TouchTracking NuGet package.

Add TouchTrackingBehavior to your view in XAML:

<!-- add namespace -->
xmlns:tt="clr-namespace:TouchTracking;assembly=TouchTracking.MAUI"

<!-- add behavior to any view -->
<Image.Behaviors>
	<tt:TouchTrackingBehavior TouchAction="OnTouchAction" />
</Image.Behaviors>

TouchAction with TouchActionEventArgs will be called on every touch event:

void OnTouchAction(object sender, TouchActionEventArgs args)
{
	Status.Text = $"Capture: {MyTouchBehavior.Capture}, " +
		$"Id: {args.Id}, " +
		$"Touch: {args.Type}, " +
		$"Location: {args.Location.X}, {args.Location.Y}, " +
		$"IsInContact: {args.IsInContact}, ";
}

not finalized yet

please note that the API is not finalized yet and might change in the future. Currently it should be easy to upgrade from the original package - I will most likely add some new features in the future. If you have any suggestions or feature requests, feel free to open an issue or a pull request.

Credits

TouchTracking.MAUI is hard-forked from TouchTrack.Forms in SkiaScene. Credits to the original author and contributors.