New to Telerik UI for WinForms? Download free 30-day trial

Working with RadRotator

Properties

The significant properties unique to RadRotator are:

Items

The RadRotator Items collection can contain a wide array of possible RadElement types. To add to the collection at design-time, click the Items property ellipses button to display the Rad Items Collection Editor. Use the Add split button to locate and select one of the available item types. In particular, RadImageItem wraps a standard Image object (look for the Image and ImageIndex properties of RadImageItem), RadWebBrowserItem can be used to display a web page by specifying the Url property. See the Getting Started topic for an example using these properties.

Running

Setting the Running property to true starts the animation.

AnimationFrames

This property controls the number of frames used to display a transition between items. Larger numbers of frames slow the animation and cause the transition to appear smoother.

Interval

Interval is the number of milliseconds between item displays.

LocationAnimation

This property controls the direction of movement when an item is animated. The LocationAnimation.Width property value when positive causes the transition between items to move left, and when negative the items move right. The LocationAnimation.Height property value when positive causes the transition between items to move up and when negative the items move down.

OpacityAnimation

When true (the default), items become more transparent as they move off screen, while the item moving onscreen to replace the previous item becomes opaque. The animation appears to smoothly blend from one item to the other. When false, new items move over the top of old items without the fading effect.

CurrentIndex

CurrentIndex gets or sets the currently displayed rotator item.

Methods

Start()

The Start method is equivalent to setting the Running property to true. You can call Start() without parameters or use the overload where the parameter takes a boolean that when true starts the animation immediately without waiting for the first interval to elapse.

Stop()

Causes the animation to freeze on the currently displayed item.

Events

StartRotation, StopRotation

The StartRotation event fires when the Running property is set to true or the Start() method is called. StartRotation passes a CancelEventArgs which allows you to stop the rotation from occuring. StopRotation is fired when Running is set false or when the Stop() method is called.

BeginRotate, EndRotate

BeginRotate and EndRotate events are fired just before and after a transition between rotator items. BeginRotate passes a BeginRotateEventArgs containing From property with the index of the previous rotator item, a To property with the index of the upcoming rotator item that will display next, and a Cancel property that when set true will prevent the upcoming rotator item from displaying.

In this article