Telerik blogs

If you are planning to use the RadRibbonBar and want to get started quickly, then you might consider using the RadRibbonForm template in VIsual Studio.  While you can use a standard form the RadRibbonForm allows you to use the RadRibbonBar and have it extend into the Title bar, just like Microsoft Office.  You will first need to install the template so it is available to you in Visual Studio.  To get started, navigate to the C:\Program Files\Telerik\RadControls for WinForms [version]\Templates.  If you are using CSharp open the CSharp directory, there are Visual Basic versions as well, in appropriately named folders, so substituted Visual Basic if that is your language of choice.  You should see a list of files in the directory as shown in the screenshot below.

image

Copy the .zip files and place them in the C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ItemTemplates\CSharp

 image

Now that the files are in place, you need to install them into Visual Studio.  Make sure that you do not have Visual Studio running at this point.  To do so, locate and start the Visual Studio 2008 Command Prompt (Run as administrator for Windows Vista and above users).  If should be located under Microsoft Visual Studio 2008 | Visual Studio Tools | Visual Studio 2008 Command Prompt.

image

Then run the following command devenv /installvstemplates and wait for the command prompt to return.  You will not receive any install notifications.

image

You will not have to repeat the process above again, because Visual Studio is now aware of the templates.  You are ready to use the templates in Visual Studio. 

 

Start up a new WIndows Forms Application and select Add New Item. You will see in the screenshot below, that the Telerik RadRibbonForm along with the other templates are now available to add to your project.  Select the Telerik RadRibbonForm and click on the Add button.

image

You will see the new RadRibbonForm added to your application and when opened in the designer, it already has a fully implemented interface using the RadRibbonBar, theming, etc…

image

This should allow you to setup your future applications that rely on the RadRibbonBar more quickly. 

 

If you prefer not to use the templates you can still use the RadRibbonForm, by modifying an existing WindowsForm.  Simply changing the following code in the Form1.cs file in the project to use the Telerik.WinControls.RadRibbonForm instead of Form.

 

Before

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

 

        }

 

    }

image

After

    public partial class Form1 : Telerik.WinControls.RadRibbonForm

    {

        public Form1()

        {

            InitializeComponent();

 

        }

 

    }

image


Related Posts

Comments

Comments are disabled in preview mode.