Link :http://www.telerik.com/support/kb/article/b454K-hta-b454T-ckd-b454c-ckd.aspx
HOW-TO
Use RadForm control
DESCRIPTION
The purpose of this article is to familiarize you with the RadForm control and to demonstrate some of its features.
OVERVIEW
The RadForm control allows you to design and display a rounded Windows form that resembles the Office 2007 style. The control comes with an integrated TitleBar to easily add forms with a custom look and feel. The shape of RadForm is predefined, and unlike the ShapedForm it cannot be changed. The RadForm is NOT a descendant of ShapedForm.
It offers a new way of rapidly creating themed windows forms. The ShapedForm remains as a control that offers more flexibility when you need to make a custom and specifically shaped window.
USAGE
It is very easy to migrate from the standard .NET 2.0 Form to a RadForm. You only need to change the inheritance of your form from the standard Microsoft Form to RadForm, as shown below:
[C#] Inheriting from RadForm:
namespace RadFormDemo
{
public partial class Form1 : Telerik.WinControls.RadForm
{
public Form1()
{
InitializeComponent();
}
}
}
RadForm Elements
RadForm has its title bar and title bar buttons built-in. You can access the title bar and its buttons using the FormElement.TitleBar member. To customize the minimize, maximize and close buttons, use the RadTitleBar.TitleBarElement MinimizeButton, MaximizeButton and CloseButton members. Each button is a RadButtonElement type that includes properties to control text, image, and layout.
[C#] Accessing the title bar:
this.FormElement.TitleBar.Text = “Open File”;
this.FormElement.TitleBar.MaximizeButton.Enabled = false;
this.FormElement.TitleBar.MinimizeButton.Enabled = false;
You can access the form border through FormElement.BorderPrimitive. Then you can customize the border to suit your needs:
[C#] Setting the border color to system default::
this.FormElement.BorderPrimitive.ForeColor = System.Drawing.Color.Green;
You can set the background color of the RadForm using the ClientFill property:
[C#] Setting the background color
this.FormElement.ClientFill.BackColor = System.Drawing.Color.Beige;
Leave a reply