ejRotator
Namespace: Wisej.Web.Ext.Syncfusion
Assembly: Wisej.Web.Ext.Syncfusion (4.1.0.0)
The Rotator control displays a set of slides. Each slide may contain images or images with content, or content with user-defined transition between them.
- C#
- VB.NET
public class ejRotator : ejBase
Public Class ejRotator
Inherits ejBase
The widget is created on a <ul> element and the slides are usually defined through the dataSource and fields options. The wrapper sets the slideWidth and slideHeight options every time the control is resized, so that the slides fill the control, replacing the values specified in the options.
Constructors
ejRotator()
Constructs a new instance of the ejRotator class.
Example:
The following example creates the rotator and binds it to a list of images through the options.
var rotator = new ejRotator();
rotator.Options.dataSource = new[]
{
new { url = "Images/beach.jpg", text = "Beach" },
new { url = "Images/mountain.jpg", text = "Mountain" },
new { url = "Images/lake.jpg", text = "Lake" }
};
rotator.Options.fields = new { url = "url", text = "text" };
rotator.Options.showCaption = true;
rotator.Size = new Size(600, 400);
this.Controls.Add(rotator);
ejRotator(options)
Constructs a new instance of the ejRotator class.
| Name | Type | Description |
|---|---|---|
| options | Object | Initial set of options. |
Example:
The following example creates a rotator that changes the slide every three seconds and moves to the next slide on request.
var rotator = new ejRotator(new
{
dataSource = photos,
fields = new { url = "ImageUrl", text = "Title" },
enableAutoPlay = true,
delay = 3000,
showPager = true
});
rotator.Dock = DockStyle.Fill;
this.Controls.Add(rotator);
// later, i.e. in the handler of a button.
rotator.Instance.slideNext();