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

Getting Started with WinForms Form

Adding RadForm to your Project

The following tutorial shows the different ways to utilize the RadForm control.

To add a RadForm control to your project you can either choose the RadForm Template from the project's 'Add New Item...' dialog or create a standard Windows Form and change its base class to Telerik.WinControls.UI.RadForm. In the following example we will create a RadForm by manually changing the base class of a standard Windows Form:

Changing the base class of a standard Windows Form to RadForm in C#:

  1. Create a new Windows Forms Application in Visual Studio

  2. Make sure that your project includes references to the following assemblies:

    1. Telerik.WinControls

    2. Telerik.WinControls.UI

  3. Right-click the default form created in the project and select the View Code option.

  4. If you are working in C#: Change the declaration of the form so that it derives from the Telerik.WinControls.UI.RadForm class

            partial class Form1 : Telerik.WinControls.UI.RadForm

    Changing the base class of a standard Windows Form to RadForm in VB.NET:

    1. Click the Show All Files button in the Solution Explorer

    2. Expand the Form1.vb node in the Solution Explorer

    3. Open the Form1.Designer.vb file by double-clicking it

    4. Change the declaration in the Form1.Designer.vb file so that it derives from the Telerik.WinControls.UI.RadForm class:

            Partial Class Form1
            Inherits Telerik.WinControls.UI.RadForm

    Return to the Design View of the form. Visual Studio will repaint the form and the ControlDefault (Office2007Blue) theme will be applied to the form. RadForm is ready for use:

    WinForms RadForm Design View

Applying a Theme to your Form

To apply a theme to RadForm, you should first drag-and-drop the desired Theme Component from the Visual Studio Toolbox onto your form. By doing this, the new theme will automatically become available for all Telerik UI for WinForms controls including RadForm:

  1. From the Visual Studio Toolbox drag the Office2007Black component and drop it on your RadForm

    WinForms RadForm VS Toolbox Office2007Black

  2. In the Properties Window set the ThemeName property of the Form to 'Office2007Black'

    WinForms RadForm ThemeName

See Also

Telerik UI for WinForms Learning Resources

In this article