We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfRotator: TapGestureRecognizer does not work with Svg

Thread ID:

Created:

Updated:

Platform:

Replies:

142096 Jan 18,2019 02:13 PM UTC Jan 23,2019 03:14 PM UTC Xamarin.Forms 1
loading
Tags: SfRotator
Jean Hardy
Asked On January 18, 2019 02:13 PM UTC

Hello,

I have implemented below code with SfRotator and FFImageLoading. The tap command works fine with any type of image but when I load a Svg in the rotator the tap command does not execute. I have tried to wrap the CachedImage control within a stacklayout, contentview and grid and associate the tap command to them but it does not work either. Can you please provide a solution?   

<xForms:SfRotator x:Name="SfRotatorMainPic"
                      SelectedIndex="{Binding RotatorSelectedIndex, Mode=TwoWay}"
                      HeightRequest="170"
                      Margin="0"
                      VerticalOptions="FillAndExpand"
                      HorizontalOptions="FillAndExpand"
                      ItemsSource="{Binding DisplayedItemPictures}"  
                      SelectedDotColor="{StaticResource ThemeColor}"
                      UnselectedDotColor="{StaticResource OddColor}"
                      EnableAutoPlay="False"
                      NavigationDirection="Horizontal"
                      NavigationStripMode="Dots"
                      NavigationStripPosition="Bottom">
            <xForms:SfRotator.Behaviors>
                <behaviors:EventToCommandBehavior EventName="SelectedIndexChanged" Command="{Binding BindingContext.RotatorIndexChanged, Source={x:Reference SfRotatorMainPic}}"/>
            </xForms:SfRotator.Behaviors>
            <xForms:SfRotator.ItemTemplate>
                <DataTemplate>
                    <ContentView Padding="0" Margin="0">
                        <ContentView.GestureRecognizers>
                            <TapGestureRecognizer NumberOfTapsRequired="2" Command="{Binding BindingContext.PictureTapped, Source={x:Reference SfRotatorMainPic}}"></TapGestureRecognizer>
                        </ContentView.GestureRecognizers>
                        <forms1:SvgCachedImage Grid.Row="0" Aspect="AspectFit" DownsampleUseDipUnits="True"
                                   BitmapOptimizations ="True" 
                                   ErrorPlaceholder="{extensions:ImageResource MyProject.Images.Pictures.image_error.png}"
                                   LoadingPlaceholder="{extensions:ImageResource MyProject.Images.Pictures.image_loading.png}"
                                   ReplaceStringMap="{Binding BindingContext.ReplaceMapSecondAppIcon, Source={x:Reference CvPictureItem}}"
                                   Source="{Binding DisplayedImage}">
                        </forms1:SvgCachedImage>
                    </ContentView>
                </DataTemplate>
            </xForms:SfRotator.ItemTemplate>
        </xForms:SfRotator>

Mugundhan Saravanan [Syncfusion]
Replied On January 23, 2019 03:14 PM UTC

Hi Jean Hardy,

Greetings from Syncfusion.

Query: “TapGestureRecognizer does not work with Svg”

We have validated the defect you have initiated with us. Thank you for taking the time to report this issue and helping us improve our product. At Syncfusion, we are committed to fixing all validated defect and including the defect fix in our upcoming volume 1 2019 release.

We will let you know once our Volume 1 2019 release has been rolled out.

Regards,
Mugundhan S.

CONFIRMATION

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;