Getting Started with WinForms Label
You can add a Radlabel either at design time or at run-time:
Design Time
- To add a Radlabel to your form, drag a Radlabel from the toolbox onto the surface of the form designer.
- In the Properties section in Visual Studio change the Text property of Radlabel.
- Click
F5
to start the application.
Run Time
To programmatically add a Radlabel to a form, create a new instance of a Radlabel, and add it to the form`s Controls collection. Change its Text and ForeColor properties.
Adding a Radlabel at Run-time
RadLabel label = new RadLabel();
this.Controls.Add(label);
label.ForeColor = Color.Green;
label.Text = "I am a RadLabel!";
Dim label As New RadLabel()
Me.Controls.Add(label)
label.ForeColor = Color.Green
label.Text = "I am a RadLabel!"
Programming RadLabel
RadLabel shares most of the properties of the standard Windows Form Label, including:
The BackColor property sets the background color of the control.
The BackgroundImage and BackgroundImageLayout properties allow you to tile, center, stretch, or zoom an image across the control.
The ForeColor property sets the color of control`s text.
The Text property sets the text in the control.
The example below has the BackgroundImage property set to "BlueHills.jpg" (available in the \Samples Pictures directory of many Windows installations) and BackgroundImageLayout set to Stretch. The ForeColor property is set to White.
See Also
Telerik UI for WinForms Learning Resources
- Telerik UI for WinForms Label 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)