ComponentOne Ribbon for WinForms
C1Ribbon (Classic) Elements / Ribbon Form
In This Topic
    Ribbon Form
    In This Topic

    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.

    Ribbon Form's Elements

    Title Bar

    The Ribbon Form title bar displays the form's caption, which can be changed using the Form.Text property.
    Title bar

    Application Button

    The main application button, which is the File tab, is located at the upper-left corner of the Ribbon.
    Application button

    Application Menu

    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:
    Application menu

    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.

    How to Create a Ribbon Form

    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:

    1. From the Solution Explorer, click the Show All Files button in the toolbar.
    2. From the Solution Explorer window, expand the Form1.vb node to reveal the Form's Designer.
      Solution explorer window
    3. Double-click Form1.Designer.vb to open the Code Editor.

      In C# Language:

    4. To open the Code Editor, right-click the Windows Form and select View Code.

      Continue in all Languages:

    5. In the Code Editor, replace the following:

      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 {
         //...
      }
      
    6. Switch back to Design view and notice that the Form now has the look and feel of the Ribbon style.

      Here you can see the difference between the Windows Form and the Ribbon Form:


      Windows and Ribbon Forms