ClassRadPanel
Used to group collections of controls.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Containers")]
[Docking(DockingBehavior.Ask)]
public class RadPanel : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadPanel
Implements:
Inherited Members
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
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
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.
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
[Browsable(false)]
public RadPanelElement PanelElement { get; }
Property Value
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
[Browsable(true)]
public override string Text { get; set; }
Property Value
The text to display on the panel
Overrides
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
One of the 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
parent
The parent RadElement to which the panel element will be added
Overrides
Dispose(bool)
Releases the unmanaged resources used by the RadPanel and optionally releases the managed resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
disposing
true to release both managed and unmanaged resources; false to release only unmanaged resources
Overrides
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
e
The ControlEventArgs containing the added control
Overrides
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
e
The ControlEventArgs containing the removed control
Overrides
OnLoad(Size)
Handles the control load event and calculates size if auto-sizing is enabled.
Declaration
protected override void OnLoad(Size desiredSize)
Parameters
desiredSize
The desired size for the control
Overrides
OnTextChanged(EventArgs)
Handles the text changed event and synchronizes the text with the panel element.
OnVisibleChanged(EventArgs)
Handles the visible changed event and recalculates size if auto-sizing is enabled.
ProcessAutoSizeChanged(bool)
Processes changes to the AutoSize property and manages event subscriptions accordingly.
Declaration
protected override void ProcessAutoSizeChanged(bool value)
Parameters
value
The new AutoSize value
Overrides
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.
ResetBackColorThemeOverrides()
Resets theme overrides for the BackColor property and reapplies the default theme values.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets theme overrides for the ForeColor property and reapplies the default theme values.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
ScrollToControl(Control)
Calculates the scroll position to bring the specified control into view. Respects the AutoScrollToCurrentControl setting.
SetBackColorThemeOverrides()
Sets theme overrides for the BackColor property across all visual states of the panel element.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets theme overrides for the ForeColor property across all visual states of the panel element.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides