Tutorial: Creating a Slide Viewer with RadRotator
The following tutorial demonstrates programmatically loading images from your "My Documents\Pictures" directory for display in the RadRotator. The tutorial will also integrate RadStatusStrip control which contains RadLabelElement.
1. In the default form of a new Windows application:
2. Drop a RadStatusStrip to the form and set the Dock property to Bottom.
3. Click the RadStatusStrip downward pointing arrow and add a RadLabelElement.
4. Drop a RadRotator on the Form and set its Dock property to Fill.
5. Navigate to the code view of the default form.
6. Change the declaration of the form so that it derives from RadForm.
7. Return to the design view of the form. Visual Studio will repaint the form.
8. Click the Events tab of the Properties Window and navigate to the Forms Load event. Double click it to create a Load event handler and replace that code with the code below. The code here uses the System.IO Directory object GetFiles() method to retrieve all ".jpg" file paths. The file paths are passed to a GetThumbNail() method that will be described next. GetThumbNail() returns an ImageItem that is added to the RadRotator items collection. Once the image items are loaded the Start() method is called to begin animation.
9. Press F5 to run the application.