$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Carousel Control for C# Windows Forms
How to Use the Carousel Component in C# Windows Forms application
Home > WinForms UI Controls > User Manual > Carousel Add Items in C#

Carousel Items for WinForms C# Tutorial

.NET Forms developers are able to add or remove items from the collection in Windows Forms Carousel to meet specific needs. Developers can add to Carousel control by using the Items collection both in programmatically or at design-time, and bind the Carousel control to a data source. It is also possible to use item descendents to populate the Carousel Items collection like LabelElement or ButtonElement. The adding and removing items provides large flexible operations for developers when designing the Carousel interface for a Windows Forms application.

How to Add Carousel Items

The following C# code shows how to add items using the Add method of the carousel collection. This tutorial will not bind data to the carousel control in WinForms application.

Carousel1.Items.Add(new ButtonElement("My Button"));
CheckBoxElement checkbox = new CheckBoxElement();
checkbox.Text = "My Checkbox";
Carousel1.Items.Add(checkbox);
ioButtonElement io1 = new ioButtonElement();
io1.Text = "Choice A";
io1.ToggleState = ToggleState.On;
ioButtonElement io2 = new ioButtonElement();
io2.Text = "Choice B";
ioButtonElement io3 = new ioButtonElement();
io3.Text = "Choice C";
Carousel1.Items.Add(io1);
Carousel1.Items.Add(io2);
Carousel1.Items.Add(io3);

How to Add and Remove Carousel Items at Design Time

.NET Forms developers are able to add carousel items using the Visual Studio designer at design time to meet specific needs.
  • Open the Carousel Smart Tag and choose Edit Items command.
  • Open the Item collection editor will open,
  • Add different types of Elements from the Item collection editor
.NET Forms developers are also able to remove carousel items using the Visual Studio designer at design time. There are two methods available for deleting an entry from the carousel Items collection. The Remove method is used to delete the Item instance and RemoveAt method is used to delete the index position of the item. The below is the C# code used for deleting Carousel items

Carousel1.Items.Remove(Carousel1.Items[0]);
Carousel1.Items.RemoveAt(0);
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls