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#:
Create a new Windows Forms Application in Visual Studio
-
Make sure that your project includes references to the following assemblies:
Telerik.WinControls
Telerik.WinControls.UI
Right-click the default form created in the project and select the View Code option.
-
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:
Click the Show All Files button in the Solution Explorer
Expand the Form1.vb node in the Solution Explorer
Open the Form1.Designer.vb file by double-clicking it
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:
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:
-
From the Visual Studio Toolbox drag the Office2007Black component and drop it on your RadForm
-
In the Properties Window set the ThemeName property of the Form to 'Office2007Black'
See Also
Telerik UI for WinForms Learning Resources
- Telerik UI for WinForms Form Component
- Getting Started with Telerik UI for WinForms Components
- Telerik UI for WinForms Setup
- Telerik UI for WinForms Application Modernization
- Telerik UI for WinForms Visual Studio Templates
- Deploy Telerik UI for WinForms Applications
- Telerik UI for WinForms Virtual Classroom(Training Courses for Registered Users)
- Telerik UI for WinForms License Agreement)