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 (将#修改为@)