ContextActions

Hi,

does the SfCarousel control support ContextActions? I could not find anything about it.

Regards
Bernd


4 Replies

BE Bernd July 21, 2018 10:29 AM UTC

Hi,

I realized that SfListView is the better way to go for me. However I was wondering if it supports ContextActions by now since the feature was already requested (Thread Id 128758) and scheduled for the 2018 V1 release.

Regards
Bernd


VR Vigneshkumar Ramasamy Syncfusion Team July 23, 2018 12:08 PM UTC

Hi Bernd 
 
Thanks for contacting Syncfusion support. 
 
Query #1  
  
SfCarousel is a content control that will be used for showing the content in a linear or perspective view. Currently Carousel does not support ContextActions as this is a similar control to a content page and not an action control.  
 
Query #2 
 
SfListView allows you to display a context menu with different menu items to an item when it is long pressed by customizing the SfListView and by using custom view in it. Please find the below UG and KB article for more details about creating context menu in SfListView control.  
 
 
 
Please let us know if this help full. 
 
Regards 
Vigneshkumar R 



BE Bernd July 23, 2018 12:28 PM UTC

Vigneshkumar,

thank you for your feedback.

I totally agree the SfCarousel is not the right choice for my horizontal listview.

Regarding the ContextActions in SfListView I understand, that it is possible to show a custom popup menu when holding an item. But is it also possible to invoke the OS specific ContextActions control which can be bound to a Xamarin forms Cell?

Regards
Bernd


VR Vigneshkumar Ramasamy Syncfusion Team July 25, 2018 03:53 AM UTC

Hi Bernd, 
 
We have checked the reported query from our end. We would like to know that you can customize your context action by hold, tap, double-tap and also using swipe. In the given sample , context action displays based on the items position by swipe in iOS  whereas in Android and UWP displays by holding. 
We have attached the sample for your reference and you can download the sample from below link. 
 
 
  if (Device.RuntimePlatform == Device.Android || Device.RuntimePlatform == Device.UWP) 
                listview.ItemHolding += SfListView_ItemHolding; 
 
            if (Device.RuntimePlatform == Device.iOS) 
                listview.SwipeEnded += Listview_SwipeEnded; 
 
            private void Listview_SwipeEnded(object sender, SwipeEndedEventArgs e) 
            { 
                VisualContainer visualContainer = listview.GetVisualContainer(); 
                var linearLayout = ListView.LayoutManager as LinearLayout; 
                var items = linearLayout.GetType().GetRuntimeFields().FirstOrDefault(x => x.Name == "items").GetValue(linearLayout) as List<ListViewItemInfo>; 
                var item = items.FirstOrDefault(i => i.ItemData == e.ItemData); 
                this.ShowPopup(item.Element.X + 55, item.Element.Y + 35); 
            } 
 
            private void SfListView_ItemHolding(object sender, ItemHoldingEventArgs e) 
            { 
                item = e.ItemData as Contacts; this.ShowPopup(e.Position.X, e.Position.Y); 
            } 
 
Please let us know if this help full. 
 
Regards, 
Vigneshkumar R 


Loader.
Up arrow icon