Reputation: 954
I want to use this xaml code:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:skia="clr-namespace:SkiaSharp.Views.Forms;assembly=SkiaSharp.Views.Forms"
xmlns:tt="clr-namespace:TouchTracking;assembly=TouchTracking"
mc:Ignorable="d"
x:Class="MyApp.MemeBuilder"
BackgroundColor="#212121">
<ContentPage.Content>
<Grid BackgroundColor="White">
<skia:SKCanvasView x:Name="MyCanvas"
PaintSurface="OnCanvasViewPaintSurface" />
<Grid.Effects>
<tt:TouchEffect Capture="True"
TouchAction="OnTouchEffectAction" />
</Grid.Effects>
</Grid>
</ContentPage.Content>
</ContentPage>
I installed skiasharp and the nuget-package TouchTracking, but I still get the error:
The type tt:TouchEffect was not found
How can I fix this?
Upvotes: 1
Views: 1063
Reputation: 2943
Looks like you are using Touch Tracking library in Forms. Your assembly reference is incorrect. Below one should work:
xmlns:tt="clr-namespace:TouchTracking.Forms;assembly=TouchTracking.Forms"
Also, make sure you install the "TouchTracking.Forms" nuget package instead "TouchTracking".
More info here : https://github.com/OndrejKunc/SkiaScene#touchtrackingforms
Upvotes: 4