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.
Unfortunately, activation email could not send to your email. Please try again.

How to disable scrolling navigation between data source

Thread ID:

Created:

Updated:

Platform:

Replies:

132747 Sep 19,2017 06:12 AM Sep 20,2017 07:44 AM Xamarin.iOS 1
loading
Tags: SfCarousel
Roy Morag
Asked On September 19, 2017 06:12 AM

Hi,
I am using with SfCarousel with custom view.
I want to navigate between views on click\swipe on buttons.

How can i do disable the scrolling and bounces?

Here my code : 

        private void SetData()
        {
            View.LayoutIfNeeded();
            _carousel = new SFCarousel
            {
                Frame = new CGRect(10, DetailsLayout.Frame.Bottom + 10, View.Frame.Width - 20, View.Frame.Height - (DetailsLayout.Frame.Bottom + 10) - 10),
                UserInteractionEnabled = true,
                ViewMode = SFCarouselViewMode.SFCarouselViewModeDefault,
                Offset = 0,

            };


            _carousel.ItemHeight = _carousel.Frame.Height;
            _carousel.ItemWidth = _carousel.Frame.Width;
            View.Add(_carousel);


            var tabs = new List<UIView>
            {
                AnimalsTable,
                CulledTable
            };
            NSMutableArray<SFCarouselItem> carouselItemCollection = new NSMutableArray<SFCarouselItem>();

            foreach (var item in tabs)
            {
                item.Frame = _carousel.Bounds;
                SFCarouselItem carouselItem = new SFCarouselItem();
                carouselItem.View = item;
                carouselItemCollection.Add(carouselItem);
            }

            _carousel.DataSource = carouselItemCollection;
            _carousel.SelectedIndex = 0;
        }

Rabhia Beham Kathar Mideenar [Syncfusion]
Replied On September 20, 2017 07:44 AM

Hi Roy Morag,

Thanks For Contacting Syncfusion Support.

Query:To Navigate between Views on button Click.

We have prepared the sample based on your requirement.Please have the same below,

Link: http://www.syncfusion.com/downloads/support/forum/132747/ze/TestCarousel18594419 
Your requirement(To disable the scrolling) can be achieved by using following code example.Please have the code snippet,

Code Example: 
carousel.Duration = 0;

Please have a look at the sample and if it does not meet you requirement, update us with detailed specification of your requirement to analyze further and provide an appropriate solution. 
Regards,
Rabhia Beham K. 


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.

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.

;