how to share SwipeTemplate as resourcedictionary between pages?

I have listview with a swipetemplate as below
    
        <ResourceDictionary
          <DataTemplate   x:Key="SwipeTemplate">
         
                    <ffimageloadingsvg:SvgCachedImage Grid.Row="0"
                                   Style="{StaticResource ImgSwapStyle}" 
                                   Source="delete.svg" >
                        <ffimageloadingsvg:SvgCachedImage.GestureRecognizers>
                            <TapGestureRecognizer
                                Command="{Binding Path=BindingContext.OnDeleteClick, Source={x:Reference Name=list}}"
                                CommandParameter="{Binding .}"                       
                            />
                        </ffimageloadingsvg:SvgCachedImage.GestureRecognizers>
                    </ffimageloadingsvg:SvgCachedImage>
                  
            </DataTemplate>
    </ResourceDictionary>

          <sfListView:SfListView x:Name="list"  BackgroundColor="White" VerticalOptions="FillAndExpand" HorizontalOptions="FillAndExpand" 
                 ...
                                               SelectedItem="{Binding SelectedItem, Mode=TwoWay}"  
                                               LeftSwipeTemplate="{StaticResource SwipeTemplate}">

Basically if SwipeTemplate is defined in the contentpage's resourcedictionary it works but i want to use it shared for all my pages where i have sflistview, therefore i need to have it in a merged dictionary. So once i defined resourcedictionary globally, it wont work. because of Source={x:Reference Name=list}.
Although all my listview's are called list, it doesnt work. So how I reference and bind it in a global resourcedictionary? 

1 Reply

GP Gnana Priya Namasivayam Syncfusion Team October 23, 2018 01:08 PM UTC

Hi Emil, 


Thanks for contacting Syncfusion support. 

We have checked the reported query from our side. We would like to know that the listview can be referred to any view or template as x:reference only within the page and you cannot refer to any other page. We highly regret to inform you that your requirement cannot be achieved by passing the listview’s reference in App.xaml page. 

Regards, 
Gnana Priya N 


Loader.
Up arrow icon