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

Little help to start with RadRotator and Visual Basic

9 Answers 213 Views
Rotator
This is a migrated thread and some comments may be shown as answers.
Chili Girl
Top achievements
Rank 1
Chili Girl asked on 31 Mar 2010, 01:31 PM
Hello. I'm starting with .net and i'm a bit confused. I want to do a simple animation with RadRotator, but does not work for me. I add items and call start function but nothing happen. Could you help me?

I need a little help to start this project. I'm using Visual Basic 2005/2008. This is a simple slide in/out with opacity. I've attached images and a video sample that i made in Expression Blend (just to have an idea). It´s possible to do same with RadRotator? please help me with a sample project :)

Video Sample in youtube:
Telerik RadRotator

Best regards

Chili
anunster.com


UPDATE:
I've tried to do it by my self, but i don't know how to add a Label into RadItemsContainer.
I've added in the form a RadRotator1---> click on items property, and i've added a RadItemsContainer .So I clicked on items property again. Now in RadItemsContainer, i've tried to add a Label control, but this control isn't available. I need to add with code at runtime? Or can i add a "Container" control into RadRotator and add controls with drag and drop? , please help,

Also, I've added a PNG Image into RadImageButton ... how can i stretch the image.it's possible?

best regards, Chili Girl

9 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 06 Apr 2010, 11:48 AM
Hi Chili Girl,

Thanks for contacting us and for choosing RadControls for WinForms.

Please excuse us for the delay with our answer. It is due to the longer Easter holiday we had in Europe.
 
I have prepared a small WinForms application that demonstrates how to implement the desired behavior using your images. In general, what you need to do is set the BackgroundImage property of the RadRotator to define the background (using the 'wallpaper' image). After that, as you can see in the attached project, I use the OnLoad event of the form to create two RadItemsContainer instances which are used to hold the content displayed in the RadRotator control. In the first RadItemsContainer instance I put a RadImageItem instance and load the 'panel' image in it. I also create a second RadImageItem instance and insert it in the Children of the first image item so that it appears over it. I also adjust the alignment according to my preferences. After that I put the first RadImageItem in the first RadItemsContainer. I leave the second RadItemsContainer instance empty so that when I click the Next button an empty slide is shown.
 
I hope this helps.
 
Please refer to the attached project for further details.
 
Best wishes,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Chili Girl
Top achievements
Rank 1
answered on 06 Apr 2010, 07:22 PM
Thanks! for your example, but i still having problems when i add a standard control, such as "Button", "ListView", "ComboBox". When i add a standard control, the transition (animation) isn't smooth and is slow. When I add featured controls, such as RadImageButtonElement, RadLabelElement, all is good and smooth. So, when i add a standard control into RadRotator, the OpacityAnimation does not work. Could you help me please?
0
Deyan
Telerik team
answered on 07 Apr 2010, 09:38 AM
Hello Chili,
 
Thanks for writing back.
 
The behavior that you describe is a limitation of Windows Forms. In general, opacity is supported only on Top Level controls such as Forms. You cannot adjust the opacity of standard WinForms controls like buttons. However, the Telerik controls are built upon a special framework which enables setting the opacity of separate elements. Therefore, if you want to have smooth performance and opacity, you should only use dedicated Telerik components in the RadRotator, otherwise you will not be able to make use of all effects and performance benefits when using Telerik components.

I hope this answers your question.

Greetings,
Deyan
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Dave Mortgatta
Top achievements
Rank 1
answered on 18 Apr 2012, 12:25 AM
First of all, I am not a program just a student. I would to create a rotator menu just like the one on the demo, the one that said controls, sample apps, productivity tools and what's new. Please kindly show examples with the smooth rotate like. thanks in advance.
0
Ivan Petrov
Telerik team
answered on 20 Apr 2012, 03:36 PM
Hello Dave,

Your question has already been answered in the other thread you have opened. Please, see our answer there for more information.

We kindly ask you to use just one support channel to contact us. Posting the same questions more than once slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, support threads are handled according to the license type and the time of posting, so if it is an urgent issue, we suggest that you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.
 
Greetings,
Ivan Petrov
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
0
Prasad
Top achievements
Rank 1
answered on 05 Mar 2015, 11:23 AM
How can i add interval for each item in radrotator. i want to add different interval for each items not same for all. Please give me solution for this problem. thanks in advance.
i.e. Item1 =2000; Item2=3000; Item3=1000 
0
Todor
Telerik team
answered on 09 Mar 2015, 03:24 PM
Hi Prasad,

You can achieve this behavior using the following approach: while adding RadRotator items set their Tag property to the desired interval. Subscribe to the EndRotate event and set current item's interval saved into the Tag property to RadRotator's Interval property. The following code demonstrates the approach.
public Form1()
{
    InitializeComponent();
    List<CustomTextElement> textElements = new List<CustomTextElement>()
    {
        new CustomTextElement(){Text = "Duration - 1 second", Duration = 1000},
        new CustomTextElement(){Text = "Duration - 2 seconds", Duration = 2000},
        new CustomTextElement(){Text = "Duration - 3 seconds", Duration = 3000},
    };
 
    foreach (CustomTextElement textElement in textElements)
    {
        RadTextBoxElement textBoxElement = new RadTextBoxElement();
        textBoxElement.Text = textElement.Text;
        textBoxElement.Tag = textElement.Duration;
        this.radRotator1.Items.Add(textBoxElement);
    }
 
    this.radRotator1.EndRotate += radRotator1_EndRotate;
    this.radRotator1.LocationAnimation = new SizeF(-1, 0);
    this.radRotator1.ShouldStopOnMouseOver = false;
    this.radRotator1.Next();
    this.radRotator1.Start();
}
 
private void radRotator1_EndRotate(object sender, EventArgs e)
{
    int newInterval = int.Parse(this.radRotator1.CurrentItem.Tag.ToString());
    this.radRotator1.Stop();
    this.radRotator1.Interval = newInterval;
    this.radRotator1.Start();
}
 
public class CustomTextElement
{
    public string Text { get; set; }
    public int Duration { get; set; }
}

For more information about RadRotator visit: Rotator | UI for WinForms Documentation

I hope information helps.

Regards,
Todor Vyagov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Chandrak
Top achievements
Rank 1
answered on 23 Jul 2015, 03:51 AM
Hi,
 I want to have rotator with sliding images (including animated GIFs) (like ticker - left to right rotation). Here is my scenario.
 (1) Receive continuous data from socket (no need to implement in sample code) in a thread. This thread in turn will add predefined images in the rotator based on data received. This means that this thread will keep on adding images to rotator 24X7 while rotator is rotating. 
(2) Will any overflow occur in rotator as end number of images will be added during day? If there is limit, code should remove items from rotator if limit breach. 
(3) I also want some label on top of each image where I can set some text.
 Can we add any control dynamically in rotator, and it rotate like ticker? If yes I need some sample code on that too please. 

Best Regards
Chandrak
0
Todor
Telerik team
answered on 27 Jul 2015, 02:34 PM
Your question has been answered in the other forum thread you have posted:  http://www.telerik.com/forums/rotator-with-sliding-images. Please see our answer there.

Regards,
Todor Vyagov
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Rotator
Asked by
Chili Girl
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Chili Girl
Top achievements
Rank 1
Dave Mortgatta
Top achievements
Rank 1
Ivan Petrov
Telerik team
Prasad
Top achievements
Rank 1
Todor
Telerik team
Chandrak
Top achievements
Rank 1
Share this question
or