Getting Started with WinForms ColorBox
The following example demonstrates how to change the ForeColor of RadLabel by using the RadColorBox.
1. Drag RadLabel and RadColorBox to a form.
2. Select the RadColorBox, click the Events tab of the Property Window, locate the ValueChanged event and double-click it to create an event handler. Replace the event handler with the following code.
private void radColorBox1_ValueChanged(object sender, EventArgs e)
{
this.radLabel1.ForeColor = this.radColorBox1.Value;
}
Private Sub RadColorBox1_ValueChanged(sender As Object, e As EventArgs)
Me.RadLabel1.ForeColor = Me.RadColorBox1.Value
End Sub
3. Press F5 to run the application. Press the color dialog button and select a color. The color is then applied as ForeColor of the RadLabel.
See Also
Telerik UI for WinForms Learning Resources
- Telerik UI for WinForms ColorBox 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)