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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Carousel control with custom path and a circular linked List

Thread ID:

Created:

Updated:

Platform:

Replies:

123206 Feb 25,2016 04:24 PM UTC Feb 29,2016 05:42 AM UTC WPF 3
loading
Tags: Carousel
Janosch Kunczik
Asked On February 25, 2016 04:24 PM UTC

Hello,

I am using the carousel control with a custom path. With the setting VisualMode="CustomPath", the control looses its nice carousel behavior (you can't click through its items in one direction without reaching an end anymore). I tried to fix this problem by moving the elements in the ObservableCollection, which is used as ItemsSource, from the end to the beginning of the list or vice versa (depending on which direction the carousel turns). Unfortunately It doesn't work as desired.

When i run the application, I get an an:

 "unhandeled exception of type 'System.ArgumentOutOfRangeException' occurred in PresentationCore.dll. Additional information: Specified argument was out of the range of valid values."

Here is my method, which runs after each SelectedIndexChanged event:

        internal void AdjustCollection(Carousel Carousel)
        {
            carousel = Carousel;
            //Coll is the ObservableCollection used as ItemsSource
            int center_index = Coll.Count / 2 + 1;
            int selected_index = Carousel.SelectedIndex;
            if (selected_index > center_index)
            {
                while(selected_index != center_index)
                {
                    Coll.Move(0,Coll.Count-1);
                    selected_index--;
                }
            }
            else
            {
                while (selected_index != center_index)
                {
                    Coll.Move(Coll.Count-1,0);
                    selected_index++;
                }
            }
        }

Does anyone have an idea of what I am doing wrong or how I can reach my goal in another way?

Kind regards,

Janosch

Attachment: CarouselSample_1a3cb908.zip

Venkateshwaran Ramdoss [Syncfusion]
Replied On February 26, 2016 09:34 AM UTC

Hi Janosch,

We have analyzed your sample. In this you have updated the Carousel item in circular path using the CustomPath. We can update the Carousel item in circular path by using 'VisualMode=Standard'. We have created sample for the same and RotationAngle is set to 90. Please download the sample from the below link.

Sample: CarouselSample

Regards,
Venkateshwaran V.R.

Janosch Kunczik
Replied On February 26, 2016 03:43 PM UTC

Hello Venkateshwaran,

Thank you again for the great support! This is exactly the behavior I needed.

Kind regards,

Janosch

Ashwini Paranthaman [Syncfusion]
Replied On February 29, 2016 05:42 AM UTC

Hi Janosch,
Thank you for the update.
We are glad that your issue has been resolved.
Please let us know if you need any other assistance.
Regards,
Ashwini P.

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.

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

;