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

Getting Started with WinForms CommandBar

You can add RadCommandBar either at design time or at run time:

Design Time

  1. To add a RadCommandBar to your form, drag a RadCommandBar from the toolbox onto the surface of the form designer. In order to set up the RadCommandBar at design time you can refer to the Design time help article.
  2. Select the default CommandBarStripElement and in the Properties section of Visual Studio open the Items property.
  3. Add the desired items by choosing the item type in the drop down button.
  4. Click F5 to start the application.

Run Time

To programmatically add a RadCommandBar to a form, create a new instance of a RadCommandBar, and add it to the form Controls collection.

Adding a RadCommandBar at runtime


RadCommandBar radCommandBar = new RadCommandBar();
this.Controls.Add(radCommandBar);
radCommandBar.Dock = DockStyle.Top;
CommandBarRowElement row1 = new CommandBarRowElement();
radCommandBar.Rows.Add(row1);
CommandBarStripElement strip1 = new CommandBarStripElement();
row1.Strips.Add(strip1);
CommandBarButton button1 = new CommandBarButton();
strip1.Items.Add(button1);

Dim radCommandBar As New RadCommandBar()
Me.Controls.Add(radCommandBar)
radCommandBar.Dock = DockStyle.Top
Dim row1 As New CommandBarRowElement()
radCommandBar.Rows.Add(row1)
Dim strip1 As New CommandBarStripElement()
row1.Strips.Add(strip1)
Dim button1 As New CommandBarButton()
strip1.Items.Add(button1)

Telerik UI for WinForms Learning Resources

In this article