skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • AI Coding Assistants
    • Embedded Reporting
    • Document Processing Libraries
    • SSO Account Sign-in

    Web

    Kendo UI UI for Angular UI for Vue UI for jQuery KendoReact UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Telerik JustMock

    CMS

    Sitefinity

    AI Productivity Tools

    AI Coding Assistants

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    KendoReact Free VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

Class RadPanel

Used to group collections of controls.

Inheritance
System.Object
RadControl
RadPanel
Inherited Members
RadControl.isResizing2
RadControl.isDisposing2
RadControl.invalidResizeRect
RadControl.isAccessibilityRequested
RadControl.Construct()
RadControl.CreateBehavior()
RadControl.CreateRootElement()
RadControl.InitializeRootElement(RootRadElement)
RadControl.LoadElementTree()
RadControl.LoadElementTree(Size)
RadControl.SetIsInitializing(Boolean)
RadControl.ShouldSerializeBackColor()
RadControl.ShouldSerializeForeColor()
RadControl.ShouldSerializeFont()
RadControl.OnKeyDown(KeyEventArgs)
RadControl.OnKeyUp(KeyEventArgs)
RadControl.OnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.OnKeyPress(KeyPressEventArgs)
RadControl.OnClick(EventArgs)
RadControl.OnDoubleClick(EventArgs)
RadControl.OnMouseDown(MouseEventArgs)
RadControl.OnMouseUp(MouseEventArgs)
RadControl.OnMouseEnter(EventArgs)
RadControl.OnMouseLeave(EventArgs)
RadControl.OnMouseMove(MouseEventArgs)
RadControl.OnMouseHover(EventArgs)
RadControl.OnMouseWheel(MouseEventArgs)
RadControl.OnMouseCaptureChanged(EventArgs)
RadControl.OnGotFocus(EventArgs)
RadControl.OnLostFocus(EventArgs)
RadControl.OnCreateControl()
RadControl.OnHandleDestroyed(EventArgs)
RadControl.OnParentChanged(EventArgs)
RadControl.OnFontChanged(EventArgs)
RadControl.OnForeColorChanged(EventArgs)
RadControl.OnBackColorChanged(EventArgs)
RadControl.OnEnabledChanged(EventArgs)
RadControl.OnBindingContextChanged(EventArgs)
RadControl.OnLocationChanged(EventArgs)
RadControl.OnPaddingChanged(EventArgs)
RadControl.OnRightToLeftChanged(EventArgs)
RadControl.OnPaint(PaintEventArgs)
RadControl.OnLayout(LayoutEventArgs)
RadControl.OnAutoSizeChanged(EventArgs)
RadControl.WndProc(Message)
RadControl.OnInvalidated(RadElement)
RadControl.OnCaptureLosing()
RadControl.OnThemeChanged()
RadControl.OnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.OnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.OnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.ProcessFocusRequested(RadElement)
RadControl.ProcessCaptureChangeRequested(RadElement, Boolean)
RadControl.CallOnMouseCaptureChanged(EventArgs)
RadControl.CallBaseOnGotFocus(EventArgs)
RadControl.CallBaseOnLostFocus(EventArgs)
RadControl.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.CallOnMouseUp(MouseEventArgs)
RadControl.CallOnMouseDown(MouseEventArgs)
RadControl.CallOnClick(EventArgs)
RadControl.CallOnDoubleClick(EventArgs)
RadControl.CallOnMouseEnter(EventArgs)
RadControl.CallOnMouseWheel(MouseEventArgs)
RadControl.CallOnMouseLeave(EventArgs)
RadControl.CallOnMouseMove(MouseEventArgs)
RadControl.CallOnMouseHover(EventArgs)
RadControl.CallOnPreviewKeyDown(PreviewKeyDownEventArgs)
RadControl.CallBaseOnKeyDown(KeyEventArgs)
RadControl.CallOnKeyDown(KeyEventArgs)
RadControl.CallBaseOnKeyPress(KeyPressEventArgs)
RadControl.CallOnKeyPress(KeyPressEventArgs)
RadControl.IsInputKey(Keys)
RadControl.GetInputElement()
RadControl.CallBaseOnKeyUp(KeyEventArgs)
RadControl.CallOnKeyUp(KeyEventArgs)
RadControl.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.CallOnVisibleChanged(EventArgs)
RadControl.BeginInit()
RadControl.EndInit()
RadControl.OnNotifyPropertyChanged(String)
RadControl.OnNotifyPropertyChanged(PropertyChangedEventArgs)
RadControl.IComponentTreeHandler.GetShowFocusCues()
RadControl.IComponentTreeHandler.CreateRootElement()
RadControl.IComponentTreeHandler.CreateChildItems(RadElement)
RadControl.IComponentTreeHandler.InitializeRootElement(RootRadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement)
RadControl.IComponentTreeHandler.InvalidateElement(RadElement, Rectangle)
RadControl.IComponentTreeHandler.InvalidateIfNotSuspended()
RadControl.IComponentTreeHandler.GetAmbientPropertyValue(RadProperty)
RadControl.IComponentTreeHandler.ControlThemeChangedCallback()
RadControl.IComponentTreeHandler.OnAmbientPropertyChanged(RadProperty)
RadControl.IComponentTreeHandler.OnFocusRequested(RadElement)
RadControl.IComponentTreeHandler.OnCaptureChangeRequested(RadElement, Boolean)
RadControl.IComponentTreeHandler.OnDisplayPropertyChanged(RadPropertyChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnThemeNameChanged(ThemeNameChangedEventArgs)
RadControl.IComponentTreeHandler.CallOnMouseCaptureChanged(EventArgs)
RadControl.IComponentTreeHandler.CallOnToolTipTextNeeded(Object, ToolTipTextNeededEventArgs)
RadControl.IComponentTreeHandler.CallOnScreenTipNeeded(Object, ScreenTipNeededEventArgs)
RadControl.GetPreferredSize(Size)
RadControl.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
RadControl.GetRootElementDesiredSize(Int32, Int32, Int32, Int32)
RadControl.OnZoomGesture(ZoomGestureEventArgs)
RadControl.OnRotateGesture(RotateGestureEventArgs)
RadControl.OnPanGesture(PanGestureEventArgs)
RadControl.OnTwoFingerTapGesture(GestureEventArgs)
RadControl.OnPressAndTapGesture(PressAndTapGestureEventArgs)
RadControl.OnGesture(GestureEventArgs)
RadControl.ProcessGesture(Message)
RadControl.EnableGesture(GestureType)
RadControl.DisableGesture(GestureType)
RadControl.Refresh()
RadControl.SuspendUpdate()
RadControl.ResumeUpdate()
RadControl.ResumeUpdate(Boolean)
RadControl.InvokeLayoutCallback(LayoutCallback)
RadControl.RegisterHostedControl(RadHostItem)
RadControl.UnregisterHostedControl(RadHostItem, Boolean)
RadControl.ControlDefinesThemeForElement(RadElement)
RadControl.ResolveStyleGroupForElement(StyleGroup, RadObject)
RadControl.GetPlainText()
RadControl.CanEditUIElement(RadElement)
RadControl.GetChildAt(Int32)
RadControl.ShouldSerializeProperty(RadProperty)
RadControl.ShouldSerializeProperty(RadProperty, RadObject)
RadControl.ResetProperty(RadProperty, RadObject)
RadControl.CanEditElementAtDesignTime(RadElement)
RadControl.GetControlDefaultSize()
RadControl.GetDpiScaledSize(Size)
RadControl.GetDpiScaledSize(SizeF)
RadControl.ProcessCodedUIMessage(IPCMessage)
RadControl.FindPropertyInChildren(RadControl, IPCMessage)
RadControl.CallAccessibilityNotifyClients(AccessibleEvents, Int32)
RadControl.IPCHost.ProcessMessage(IPCMessage)
RadControl.ScaleControl(SizeF, BoundsSpecified)
RadControl.PerformRadAutoScale(Nullable<BoundsSpecified>)
RadControl.SetRadAutoScale(Boolean)
RadControl.IComponentTreeHandler.get_Name()
RadControl.IComponentTreeHandler.set_Name(String)
RadControl.EnableDpiScaling
RadControl.EnableRadAutoScale
RadControl.EnableRadFormInitialDpiScaling
RadControl.EnableImageDpiScaling
RadControl.EnableSvgImages
RadControl.IsTrial
RadControl.IsLoaded
RadControl.LayoutManager
RadControl.ElementTree
RadControl.UseCompatibleTextRenderingDefaultValue
RadControl.Behavior
RadControl.RootElement
RadControl.Padding
RadControl.ThemeName
RadControl.EnableTheming
RadControl.ThemeClassName
RadControl.ImageList
RadControl.ImageScalingSize
RadControl.UseCompatibleTextRendering
RadControl.AutoSize
RadControl.MaximumSize
RadControl.MinimumSize
RadControl.Focusable
RadControl.Site
RadControl.IsInitializing
RadControl.SmallImageList
RadControl.SmallImageScalingSize
RadControl.IsDesignMode
RadControl.IsDisplayed
RadControl.FocusedElement
RadControl.AllowShowFocusCues
RadControl.ShowItemToolTips
RadControl.CommandBindings
RadControl.EnableKeyMap
RadControl.BackColor
RadControl.ForeColor
RadControl.Font
RadControl.ValidationCancel
RadControl.IComponentTreeHandler.IsDesignMode
RadControl.IComponentTreeHandler.ElementTree
RadControl.IComponentTreeHandler.Behavior
RadControl.IComponentTreeHandler.Initializing
RadControl.IComponentTreeHandler.ThemeClassName
RadControl.EnableGestures
RadControl.EnableAnalytics
RadControl.AnalyticsName
RadControl.EnableRadAccessibilityObjects
RadControl.AccessibilityRequested
RadControl.EnableCodedUITests
RadControl.EnableCodedUITestsDefaultValue
RadControl.EnableUIAutomation
RadControl.EnableUIAutomationDefaultValue
RadControl.IPCHost.Context
RadControl.ElementInvalidated
RadControl.ToolTipTextNeeded
RadControl.ScreenTipNeeded
RadControl.ThemeNameChanged
RadControl.Initialized
RadControl.PropertyChanged
RadControl.ZoomGesture
RadControl.RotateGesture
RadControl.PanGesture
RadControl.TwoFingerTapGesture
RadControl.PressAndTapGesture
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll

Syntax

[TelerikToolboxCategory("Containers")]
public class RadPanel : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Remarks

A RadPanel is a control that contains other controls. You can use a RadPanel to group collections of controls such as a group control of radio buttons. If the RadPanel control's Enabled property is set to false, the controls contained within the RadPanel will also be disabled.

You can use the AutoScroll property to enable scroll bars in the RadPanel control. When the AutoScroll property is set to true, any controls located within the RadPanel (but outside of its visible region), can be scrolled to with the scroll bars provided.

The RadPanel control is displayed by default with border and a text (using TextPrimitive). There is a FillPrimitive which is transparent by default. It allows gradients to be used for background of the RadPanel.

Constructors

RadPanel()

Initializes a new instance of the RadPanel class with default settings. Sets up container control styles and scroll event handling.

Declaration
public RadPanel()

Properties

AutoScrollToCurrentControl

Gets or sets a value indicating whether the panel will automatically scroll to show the currently focused control inside it when focus changes.

Declaration
public bool AutoScrollToCurrentControl { get; set; }
Property Value
System.Boolean

true if the panel automatically scrolls to focused controls; otherwise, false. The default is true

CausesValidation

Gets or sets a value indicating whether the control causes validation to be performed on any controls that require validation when it receives focus.

Declaration
public bool CausesValidation { get; set; }
Property Value
System.Boolean

true if the control causes validation to be performed on any controls requiring validation when it receives focus; otherwise, false. The default is true

DefaultSize

Gets the default size of the control used during initialization.

Declaration
protected override Size DefaultSize { get; }
Property Value
System.Drawing.Size

The default System.Drawing.Size of the control (200, 100)

PanelElement

Gets the RadPanelElement that represents the visual element of this panel control. This element contains the visual styling and layout logic for the panel.

Declaration
public RadPanelElement PanelElement { get; }
Property Value
RadPanelElement

A RadPanelElement that represents the panel's visual element

Text

Gets or sets the text displayed on the panel. This property overrides the base implementation to provide panel-specific text handling.

Declaration
public override string Text { get; set; }
Property Value
System.String

The text to display on the panel

Overrides
RadControl.Text

TextAlignment

Gets or sets the alignment of the text within the panel's bounds. Determines how text is positioned when displayed on the panel.

Declaration
public ContentAlignment TextAlignment { get; set; }
Property Value
System.Drawing.ContentAlignment

One of the System.Drawing.ContentAlignment values. The default is MiddleLeft

Methods

CreateChildItems(RadElement)

Creates the main panel element and adds it to the specified parent element. This method is called during control initialization to set up the visual hierarchy.

Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
RadElement parent

The parent RadElement to which the panel element will be added

Overrides
RadControl.CreateChildItems(RadElement)

Dispose(Boolean)

Releases the unmanaged resources used by the RadPanel and optionally releases the managed resources.

Declaration
protected override void Dispose(bool disposing)
Parameters
System.Boolean disposing

true to release both managed and unmanaged resources; false to release only unmanaged resources

Overrides
RadControl.Dispose(Boolean)

OnControlAdded(ControlEventArgs)

Handles the control added event and sets up auto-sizing behavior for the new control.

Declaration
protected override void OnControlAdded(ControlEventArgs e)
Parameters
System.Windows.Forms.ControlEventArgs e

The System.Windows.Forms.ControlEventArgs containing the added control

OnControlRemoved(ControlEventArgs)

Handles the control removed event and cleans up auto-sizing behavior for the removed control.

Declaration
protected override void OnControlRemoved(ControlEventArgs e)
Parameters
System.Windows.Forms.ControlEventArgs e

The System.Windows.Forms.ControlEventArgs containing the removed control

OnLoad(Size)

Handles the control load event and calculates size if auto-sizing is enabled.

Declaration
protected override void OnLoad(Size desiredSize)
Parameters
System.Drawing.Size desiredSize

The desired size for the control

Overrides
RadControl.OnLoad(Size)

OnTextChanged(EventArgs)

Handles the text changed event and synchronizes the text with the panel element.

Declaration
protected override void OnTextChanged(EventArgs e)
Parameters
System.EventArgs e

The System.EventArgs containing event data

OnVisibleChanged(EventArgs)

Handles the visible changed event and recalculates size if auto-sizing is enabled.

Declaration
protected override void OnVisibleChanged(EventArgs e)
Parameters
System.EventArgs e

The System.EventArgs containing event data

Overrides
RadControl.OnVisibleChanged(EventArgs)

ProcessAutoSizeChanged(Boolean)

Processes changes to the AutoSize property and manages event subscriptions accordingly.

Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
System.Boolean value

The new AutoSize value

Overrides
RadControl.ProcessAutoSizeChanged(Boolean)

ProcessMnemonic(Char)

Processes mnemonic characters for the panel control. If the specified character matches the panel's mnemonic, focuses the next control in the tab order.

Declaration
protected override bool ProcessMnemonic(char charCode)
Parameters
System.Char charCode

The character to process as a mnemonic key

Returns
System.Boolean

true if the character was processed as a mnemonic; otherwise, false

Overrides
RadControl.ProcessMnemonic(Char)

ResetBackColorThemeOverrides()

Resets theme overrides for the BackColor property and reapplies the default theme values.

Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
RadControl.ResetBackColorThemeOverrides()

ResetForeColorThemeOverrides()

Resets theme overrides for the ForeColor property and reapplies the default theme values.

Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
RadControl.ResetForeColorThemeOverrides()

ScrollToControl(Control)

Calculates the scroll position to bring the specified control into view. Respects the AutoScrollToCurrentControl setting.

Declaration
protected override Point ScrollToControl(Control activeControl)
Parameters
System.Windows.Forms.Control activeControl

The control to scroll into view

Returns
System.Drawing.Point

The scroll position needed to display the control

SetBackColorThemeOverrides()

Sets theme overrides for the BackColor property across all visual states of the panel element.

Declaration
protected override void SetBackColorThemeOverrides()
Overrides
RadControl.SetBackColorThemeOverrides()

SetForeColorThemeOverrides()

Sets theme overrides for the ForeColor property across all visual states of the panel element.

Declaration
protected override void SetForeColorThemeOverrides()
Overrides
RadControl.SetForeColorThemeOverrides()

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.