Getting Started with WinForms Panel
You can add a RadPanel either at design time or at run-time:
Design Time
- To add a RadPanel to your form, drag a RadPanel from the toolbox onto the surface of the form designer.
- In the Properties section in Visual Studio change the Dock property of RadPanel to Fill.
- Drag another control from the toolbox and place it on the panel.
- Click
F5
to start the application.
Run Time
To programmatically add a RadPanel to a form, create a new instance of a RadPanel, and add it to the form`s Controls collection. Change its Text, ForeColor, and BackColor properties.
Adding a RadPanel at Run-time
RadPanel panel = new RadPanel();
this.Controls.Add(panel);
panel.ForeColor = Color.DarkBlue;
panel.BackColor = Color.LightBlue;
panel.PanelElement.PanelBorder.ForeColor = Color.Gray;
panel.Text = "I am a RadPanel!";
Dim panel As New RadPanel()
Me.Controls.Add(panel)
panel.ForeColor = Color.DarkBlue
panel.BackColor = Color.LightBlue
panel.PanelElement.PanelBorder.ForeColor = Color.Gray
panel.Text = "I am a RadPanel!"
Programming RadPanel
RadPanel shares most of the properties of the standard Windows Form Panel, 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 control`s text color.
The Text property sets the text in the control.
The example below has the BackgroundImage property set to the Progress logo.
See Also
Telerik UI for WinForms Learning Resources
- Telerik UI for WinForms Panel 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)