If you have a RadRotator with several RadImageButtonElement and you try to go to the next imagebuttons quickly (by calling Next() several times), you end with an empty RadRotator.
Workaround:
DateTime dt = DateTime.Now;
int interval = 500;
private void radButton1_Click(object sender, EventArgs e)
{
TimeSpan span = DateTime.Now - dt;
if (span.TotalMilliseconds > interval)
{
this.radRotator1.Next();
dt = DateTime.Now;
}
}
private void radButton2_Click(object sender, EventArgs e)
{
TimeSpan span = DateTime.Now - dt;
if (span.TotalMilliseconds > interval)
{
this.radRotator1.Previous();
dt = DateTime.Now;
}
}
To reproduce:
-add RadRotator
-add items to the rotator: add 3 RadLabels
-enable Running property
-run the project and you will see that initially all RadLabels are visible and they overlap each other. After all items are rotated once, the layout is correct
Workaround:
public Form1()
{
InitializeComponent();
this.radRotator1.Running = true;
foreach (RadItem item in this.radRotator1.Items)
{
item.Visibility = ElementVisibility.Collapsed;
}
}