如何解决未知事件DropGesture
我尝试为拖放添加事件,但我仍然收到此消息:
Could not resolve type with token 0100004d from typeref (expected class 'Xamarin.Forms.DropGestureRecognizer' in assembly 'Xamarin.Forms.Core,Version=2.0.0.0,Culture=neutral,PublicKeyToken=null')'
我正在使用Nuget软件包。
是否有要添加的扩展名?
这是使用的代码。
<?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"
mc:Ignorable="d"
xmlns:local="clr-namespace:SafeMountain"
x:Class="SafeMountain.MainPage"
xmlns:control="clr-namespace:SafeMountain.UserControls"
NavigationPage.HasNavigationBar="False">
<Grid x:Name="gridMain">
<StackLayout Orientation="Vertical" VerticalOptions="FillAndExpand">
<ScrollView Orientation="Vertical">
<StackLayout Margin="15,15,0" x:Name="slItems">
<StackLayout.GestureRecognizers>
<DropGestureRecognizer AllowDrop="True" Drop="DropGestureRecognizer_Drop"/>
</StackLayout.GestureRecognizers>
<Label x:Name="lblLastPosCatch" HorizontalOptions="Center" HorizontalTextAlignment="Center" TextColor="LightGray" FontSize="Micro"/>
<StackLayout x:Name="slDeconnexion">
<Label x:Name="lblDeconnexionInfo" TextColor="Red" Text="Déconnecté du réseau cellulaire" HorizontalTextAlignment="Center"/>
</StackLayout>
</StackLayout>
</ScrollView>
</StackLayout>
</Grid>
</ContentPage>
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。