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. Image for the cookie policy date
close icon

SfRotator: TapGestureRecognizer does not work with Svg

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>

1 Reply

MS Mugundhan Saravanan Syncfusion Team 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.

Loader.
Live Chat Icon For mobile
Up arrow icon