This is a migrated thread and some comments may be shown as answers.

Using a radCarousel with a variable number of items (less than 5)

3 Answers 231 Views
Carousel
This is a migrated thread and some comments may be shown as answers.
Bert
Top achievements
Rank 1
Bert asked on 05 Feb 2011, 03:55 PM
Dear Forum readers,

I am new to Telerik's Winforms controls and must first say that I am impressed with them. The music library demo especially inspired me because of its "cover flow" look. I decided to give it a spin ;-) and try to implement this in one of our products.
So I chose to use a Bezier path as in the example and started adding items... (paintings in my case).
The problem that I encountered is that I have a variable number of images that are attached to a database record. The number of images gan be anything from 1... n What I want to achieve is that the selected image is always in the centre (middle) position. This works great for an odd number of items, but not for an even number of items. In the case of an even numberof items there are two images at the centre sitting side by side. The situation even becomes weirder when the number of items falls below 3:
If there are only two items then each of them sits at the end of the Bezier path, with nothing in the middle, when there is only a single item then this is placed at the end of the Bezier path and the animation becomes weird too: it "flashes" twice on display (not what you want).

This is the arrangement that i would expect:

5 items

5            1
    4     3
       2

4 items:

4
    3     1
        2

3 items:

3       1
    2

2 items:

2
     1

1 item:

       1

I have created a small Visual studio 2010 project that illustrates my problem. Yoiu can download it at : ftp://ftp.adlibsoft.com/pub/outgoing/carouseltest.zip Does anyone know how I can achieve what I want with the radCarousel ? I tried different Bezier paths for 2 or 1 items. Tha "kind of" works, but I am still stuck with the double animation when there is only a single item. Turning the animation off helps, but that is also not what one wants.

Thanks in advance for any suggestions

Bert Degenhart Drenth
Adlib Information Systems
bdd@adlibsoft.com
www.adlibsoft.com

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Feb 2011, 09:27 PM
Hi Bert,

Thank you for sending us your project.

I was able to reproduce the described behavior and I confirm that this is an issue. We will address it in one of our future releases. You can work around the issue by changing the carousel path. You should increase Z coordinates for the start and the end point to make the glitch acceptable. Please, refer to the attached project. I have added points to your account for the reporting. 

Don't hesitate to contact us if you have other questions.

Kind regards,
Peter
the Telerik team
Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
0
Todd
Top achievements
Rank 1
answered on 24 Sep 2013, 04:23 PM
Bert,

I seem to be having this same behavior from the Carousel control. Should I assume this has not been addressed? It has been well over two years since this was posted. This is very disappointing since I wanted to use this control in a project I am developing :-(  I hope there is a solution because the Carousel control for WinForms is not useable in this condition.

Sincerely,
Todd


Here is the original post:

Posted on Feb 5, 2011

Dear Forum readers,

I am new to Telerik's Winforms controls and must first say that I am impressed with them. The music library demo especially inspired me because of its "cover flow" look. I decided to give it a spin ;-) and try to implement this in one of our products.
So I chose to use a Bezier path as in the example and started adding items... (paintings in my case).
The problem that I encountered is that I have a variable number of images that are attached to a database record. The number of images gan be anything from 1... n What I want to achieve is that the selected image is always in the centre (middle) position. This works great for an odd number of items, but not for an even number of items. In the case of an even numberof items there are two images at the centre sitting side by side. The situation even becomes weirder when the number of items falls below 3:
If there are only two items then each of them sits at the end of the Bezier path, with nothing in the middle, when there is only a single item then this is placed at the end of the Bezier path and the animation becomes weird too: it "flashes" twice on display (not what you want).

This is the arrangement that i would expect:

5 items

5            1  
    4     3          <-------------------- I would assume this is a typo? I think 2 and 3 should be switched around.
       2

4 items:

4
    3     1
        2

3 items:

3       1
    2

2 items:

2
     1

1 item:

       1

I have created a small Visual studio 2010 project that illustrates my problem. Yoiu can download it at : ftp://ftp.adlibsoft.com/pub/outgoing/carouseltest.zip Does anyone know how I can achieve what I want with the radCarousel ? I tried different Bezier paths for 2 or 1 items. Tha "kind of" works, but I am still stuck with the double animation when there is only a single item. Turning the animation off helps, but that is also not what one wants.

Thanks in advance for any suggestions

Bert Degenhart Drenth
Adlib Information Systems
bdd@adlibsoft.com
www.adlibsoft.com
0
George
Telerik team
answered on 25 Sep 2013, 01:46 PM
Hi Todd,

Thank you for writing.

I can confirm that this issue was not resolved, that is why I have logged it in our Public Issue Tracking System. You can subscribe for changes/vote/comment on this url - PITS Issue.

As a workaround for the time being you can add other elements with Visibility set to Hidden:
this.carousel.Items.Add(new RadButtonElement("Text"));
for (int i = 0; i < 4; i++)
{
    this.carousel.Items.Add(new RadButtonElement(){ Visibility = ElementVisibility.Hidden });
}

I have also updated your Telerik Points for bringing this to our attention.

If you have any further queries, do not hesitate to contact us.

Regards,
George
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WINFORMS.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Carousel
Asked by
Bert
Top achievements
Rank 1
Answers by
Peter
Telerik team
Todd
Top achievements
Rank 1
George
Telerik team
Share this question
or