The Ribbon Form is represented by the C1RibbonForm class and has been calculated to display the C1Ribbon and C1StatusBar controls. The Ribbon Form, like a Windows Form, contains a title bar and a client region. When the C1Ribbon control is added to the Ribbon Form, the title bar is automatically displayed with the Quick Access Toolbar (QAT) within the title bar.
The Ribbon Form title bar displays the form's caption, which can be changed using the Form.Text property.
The main application button, which is the File tab, is located at the upper-left corner of the Ribbon.
The RibbonApplicationMenu provides access to the Application menu of main commands that operate on the document as a whole. The menu items can be displayed as images, text, or both. You can change the appearance of the menu to full-size as in the Office 2016 using the Appearance property of ApplicationMenu class. This view only works with the Custom visual style and themes.
At run time, simply click the application button to reveal the list of main commands. Here is an example of an Application menu that was created:
You can easily customize the main button to fit your needs. For example, you can add a custom image, add a Windows 7-style application button, and add your own items to the Start menu. For details on modifying the main application button, see the Importing a Custom Image for the Application Button, Making a Windows 7-Style Application Button, Changing the Color of the Application Button, and Creating the Application Menu topics.
When you create a new Windows Application project, a Windows Form appears in design view. To change the Windows Form to a Ribbon Form, complete the following steps:
In Visual Basic Language:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Partial Class Form1 Inherits System.Windows.Forms.Form '... End Class |
To write code in C#
C# |
Copy Code
|
---|---|
partial class Form1 : Form { //... } |
With
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Partial Class Form1 Inherits C1.Win.C1Ribbon.C1RibbonForm '... End Class |
To write code in C#
C# |
Copy Code
|
---|---|
partial class Form1 : C1.Win.C1Ribbon.C1RibbonForm { //... } |
Here you can see the difference between the Windows Form and the Ribbon Form: