Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
147335 | Sep 5,2019 02:46 PM UTC | Sep 10,2019 09:15 AM UTC | Xamarin.Forms | 5 |
![]() |
Tags: SfAutoComplete |
If SfListView.ItemTemplate contains some entry, for example SfAutoComplete it prevents items reordering and swiping from start. In the example bellow you can start swiping and reordering by pressing "green" (Label) and "blue"(SfTextInputLayout) area, but green area capture everything, so swipe and reordering not starting.
I noticed also there is some problem with "blue area" (SfTextInputLayout), if you start swipe or reorder from "blue" it works fine, but when you release tap, the long press event is sent to SfAutoComplete and it shows "Copy/Paste" popup.
Could you advise me how to stop SfAutoComplete from capturing long press and force it to bubble it up without doing anything? In perfect solution I would like to have 2 different behaviours depend if SfAutoComplete has focus or not.
1. If SfAutoComplete has focus than current behavior is ok.
2. If SfAutoComplete hasn't focus than:
a. SfTextInputLayout bubble long press and pan gesture up as it is now, and doesn't activate focus and send long press to SfTextInputLayout.Input
b. SfAutoComplete bubble long press and pan gesture up and doesn’t do anything
<xForms:SfListView ItemsSource="{Binding Items}"
DragStartMode="OnHold"
ItemSize="70"
AllowSwiping="True">
<xForms:SfListView.RightSwipeTemplate>
<DataTemplate>
<Grid>
<Label Text="Right Swipe"/>
</Grid>
</DataTemplate>
</xForms:SfListView.RightSwipeTemplate>
<xForms:SfListView.ItemTemplate>
<DataTemplate>
<Grid ColumnSpacing="0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="1*"/>
<ColumnDefinition Width="3*"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" Text="{Binding}" BackgroundColor="Green"/>
<textInputLayout:SfTextInputLayout Grid.Column="1" BackgroundColor="Blue">
<xForms1:SfAutoComplete Text="SfTextInputLayout" BackgroundColor="Red"/>
</textInputLayout:SfTextInputLayout>
</Grid>
</DataTemplate>
</xForms:SfListView.ItemTemplate>
</xForms:SfListView>
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.