微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

Xamarin Firebase数据库删除项

如何解决Xamarin Firebase数据库删除项

<ListView ItemsSource="{Binding Product}" CachingStrategy="RecycleElement" HasUnevenRows="True" x:Name="lstProducts" SelectedItem="{Binding SelectedProduct}">
        <ListView.ItemTemplate>
            <DataTemplate>
                <ViewCell>
                    <Frame CornerRadius="13" Padding="-10" BackgroundColor="#00a8cc">
                    <StackLayout Margin="35" Orientation="Horizontal">
                            <ImageButton Source="uninstalling_updates_64px.png" HorizontalOptions="StartAndExpand" WidthRequest="20" BackgroundColor="Transparent"/>
                            <Label Text="{Binding ProductId}" FontSize="10" HorizontalOptions="CenterandExpand" x:Name="lblProductId"/>
                            <Label Text="{Binding ProductName}" FontAttributes="Bold" FontSize="15" HorizontalOptions="Center"/>
                            <Label Text="{Binding ProductDetail}" FontSize="13" HorizontalOptions="CenterandExpand"/>
                            <Label Text="{Binding ProductPrice}" FontSize="8" HorizontalOptions="CenterandExpand"/>
                            <ImageButton Source="trash_48px.png" HorizontalOptions="EndAndExpand" WidthRequest="20" BackgroundColor="Transparent" x:Name="deleteButn" Clicked="deleteButn_Clicked"/>
                        </StackLayout>
                    </Frame>
                </ViewCell>
            </DataTemplate>
        </ListView.ItemTemplate> 

在这里一个列表视图,我想用放在列表视图中的按钮删除该记录。我能怎么做?谢谢您的帮助

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。