【发布时间】:2019-11-25 23:05:19
【问题描述】:
我想使用这个 xaml 代码:
<?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>
我安装了skiasharp和nuget-package TouchTracking,但我仍然收到错误:
类型 tt:TouchEffect 未找到
我该如何解决这个问题?
【问题讨论】:
-
关闭 IDE 并重新打开并进行重建。
-
TouchTracking 在这种情况下不是 nuget 包
-
重新打开重建后还是一样的错误
-
您需要在您的项目中包含 TouchEffect.cs - 它是您从中复制的示例项目的一部分
标签: xaml xamarin xamarin.forms