Hello,
I run into issue with SfEffectsView, as I am using it for TouchDown and LongPress commands. In earlier versions, I was able to fire LongPress without TouchDown. In the current version (19.1.0.69), LongPress is fired alongside with TouchDown, which shouldn't be the case.
Is there a way to separate LongPress from touch events as TouchUp and TouchDown ?
Here is small sample with the issue.
Attachment: SfEffectsViewPressCommandsIssue_96bed967.zip
Hello,
sorry, I have checked it with previous versions also and I couldn't find version where TouchDown wasn't fired after LongPress. It's a feature then and you can't separate Touch from LongPress.
I found workaroud using XCT, where you can attach TouchEffects to any control including SfEffectsView, but I would like to stick with Syncfusion. Is there a way to achieve the same functionality with TouchEvents in SfEffectsView ?
xct:TouchEffect.Command="{Binding Source={x:Reference ***}, Path=BindingContext.TouchUpCommand}"
xct:TouchEffect.LongPressCommand="{Binding Source={x:Reference ***}, Path=BindingContext.LongPressCommand}"
If I longpress SfEffectView with these commands, Touch isn't fired.
Thank you.
<StackLayout>
<Grid HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<syncEffectsView:SfEffectsView IsClippedToBounds="True" BackgroundColor="Black" Padding="10,5,10,5" CornerRadius="10" TouchDownEffects="Ripple"
TouchUpCommand="{Binding Source={x:Reference MainPageSource}, Path=BindingContext.TouchUpCommand}"
LongPressedCommand="{Binding Source={x:Reference MainPageSource}, Path=BindingContext.LongPressCommand}">
<Label Grid.Row="0" Text="TouchDown and LongPress label" FontAttributes="none" HorizontalOptions="Start" FontSize="19" TextColor="White"/>
</syncEffectsView:SfEffectsView>
</Grid>
</StackLayout> |
public class MainPageViewModel {
#region COMMANDS
public ICommand TouchUpCommand { get; private set; }
public ICommand LongPressCommand { get; private set; }
#endregion
public MainPageViewModel(ContentPage u_Page)
{
_Page = u_Page;
TouchUpCommand = new Command(async () => await TouchUp());
LongPressCommand = new Command(async () => await LongPress());
}
private ContentPage _Page;
private async Task TouchUp()
{
System.Diagnostics.Debug.WriteLine("UP");
}
private async Task LongPress()
{
System.Diagnostics.Debug.WriteLine("longPress");
}
} |