| Ribbon for WinForms Task-Based Help > Adding Ribbon Items > Adding Items to the Quick Access Toolbar |
The Quick Access Toolbar (QAT) can grow to accommodate as many commands as needed. To add items to the QAT, use the smart designer or add code. Each option is described below.
Complete the following steps:


![]() |
Note: In the following example embedded resources containing the following images are used: save.png, undo.png, and repeat.png. To embed a resource, from the Project menu, choose YourProjectName Properties. From the Resources tab, select Add Resource and choose to add an existing file or add a new one. |
To add Ribbon items (for example, Save, Undo, and Repeat) to the QAT, add the following code to your project:
To write code in Visual Basic
| Visual Basic |
Copy Code
|
|---|---|
' include the Imports directive for the namespace
Imports C1.Win.C1Ribbon
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.save))
C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.undo))
C1Ribbon1.Qat.Items.Add(New RibbonButton(My.Resources.Resources.repeat))
End Sub
|
|
To write code in C#
| C# |
Copy Code
|
|---|---|
// include the using directive for the namespace
using C1.Win.C1Ribbon;
private void Form1_Load(object sender, System.EventArgs e)
{
C1Ribbon1.Qat.Items.Add (new RibbonButton (Properties.Resources.save));
C1Ribbon1.Qat.Items.Add (new RibbonSplitButton (Properties.Resources.undo));
C1Ribbon1.Qat.Items.Add (new RibbonButton (Properties.Resources.repeat));
}
|
|