Class RadGroupBox
Represents a group box control that visually groups related controls and optionally defines radio button groups. Inherits from RadControl and provides customizable header and footer areas with theming support.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Containers")]
public class RadGroupBox : RadControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadGroupBox()
Initializes a new instance of the RadGroupBox class with default settings. Sets up container control styles and accessibility properties.
Declaration
public RadGroupBox()
Properties
AutoScroll
This property is not relevant for this class.
Declaration
public override bool AutoScroll { get; set; }
Property Value
|
System.Boolean
|
DefaultSize
Gets the default size of the group box control when no explicit size is specified.
Declaration
protected override Size DefaultSize { get; }
Property Value
|
System.Drawing.Size
|
FooterImage
FooterImageAlignment
FooterImageIndex
FooterImageKey
FooterText
FooterTextAlignment
FooterTextImageRelation
FooterVisibility
GroupBoxElement
Gets the RadGroupBoxElement that provides the visual representation and functionality of the group box.
Declaration
public RadGroupBoxElement GroupBoxElement { get; }
Property Value
|
RadGroupBoxElement
|
GroupBoxStyle
Gets or sets the visual style of the group box, determining its overall appearance theme.
Declaration
public RadGroupBoxStyle GroupBoxStyle { get; set; }
Property Value
|
RadGroupBoxStyle
|
HeaderAlignment
Gets or sets the alignment of the header within its designated position area.
Declaration
public HeaderAlignment HeaderAlignment { get; set; }
Property Value
|
HeaderAlignment
|
HeaderImage
Gets or sets the image displayed in the header area of the group box.
Declaration
public Image HeaderImage { get; set; }
Property Value
|
System.Drawing.Image
|
HeaderImageAlignment
Gets or sets the alignment of the header image within the header area.
Declaration
public ContentAlignment HeaderImageAlignment { get; set; }
Property Value
|
System.Drawing.ContentAlignment
|
HeaderImageIndex
Gets or sets the index used to retrieve the header image from an associated image list.
Declaration
[RadDefaultValue("ImageIndex", typeof(ImagePrimitive))]
[RadDescription("HeaderImageIndex", typeof(RadGroupBoxElement))]
public int HeaderImageIndex { get; set; }
Property Value
|
System.Int32
|
HeaderImageKey
Gets or sets the key used to retrieve the header image from an associated image list.
Declaration
[RadDefaultValue("ImageKey", typeof(ImagePrimitive))]
[RadDescription("HeaderImageKey", typeof(RadGroupBoxElement))]
public string HeaderImageKey { get; set; }
Property Value
|
System.String
|
HeaderMargin
Gets or sets the margin around the header area that controls spacing from surrounding elements.
Declaration
[RadPropertyDefaultValue("Margin", typeof(RadElement))]
public Padding HeaderMargin { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
HeaderPosition
Gets or sets the position of the header relative to the group box content area.
Declaration
public HeaderPosition HeaderPosition { get; set; }
Property Value
|
HeaderPosition
|
HeaderText
Gets or sets the text content displayed in the header area of the group box.
Declaration
public string HeaderText { get; set; }
Property Value
|
System.String
|
HeaderTextAlignment
Gets or sets the alignment of the header text within the header area.
Declaration
public ContentAlignment HeaderTextAlignment { get; set; }
Property Value
|
System.Drawing.ContentAlignment
|
HeaderTextImageRelation
Gets or sets the spatial relationship between the header text and header image.
Declaration
public TextImageRelation HeaderTextImageRelation { get; set; }
Property Value
|
System.Windows.Forms.TextImageRelation
|
Padding
Gets or sets the padding within the group box border that defines the spacing between the border and child controls.
Declaration
public Padding Padding { get; set; }
Property Value
|
System.Windows.Forms.Padding
|
Text
Gets or sets the header text displayed at the top of the group box. This property provides a convenient way to set the header content.
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
UseMnemonic
Gets or sets a value indicating whether mnemonic characters are processed for keyboard navigation. When enabled, users can activate controls using Alt + the mnemonic character defined in the header text.
Declaration
public bool UseMnemonic { get; set; }
Property Value
|
System.Boolean
|
Methods
CreateChildItems(RadElement)
Creates the child items for the group box control and sets up the default layout.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
|
RadElement
parent
The parent RadElement to which child items will be added |
Overrides
CreateGroupBoxElement()
Creates the main group box element that provides the visual representation and functionality.
Declaration
protected virtual RadGroupBoxElement CreateGroupBoxElement()
Returns
|
RadGroupBoxElement
A new instance of RadGroupBoxElement |
Dispose(Boolean)
Releases the unmanaged resources used by the RadGroupBox 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
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 |
OnMouseWheel(MouseEventArgs)
Handles the mouse wheel event and invalidates the control to ensure proper visual updates.
Declaration
protected override void OnMouseWheel(MouseEventArgs e)
Parameters
|
System.Windows.Forms.MouseEventArgs
e
The System.Windows.Forms.MouseEventArgs containing mouse wheel event data |
Overrides
OnScroll(ScrollEventArgs)
Handles the scroll event and invalidates the control to ensure proper visual updates.
Declaration
protected override void OnScroll(ScrollEventArgs se)
Parameters
|
System.Windows.Forms.ScrollEventArgs
se
The System.Windows.Forms.ScrollEventArgs containing scroll event data |
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
ProcessMnemonic(Char)
Processes mnemonic characters for the group box control. If the specified character matches the header text 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
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 to header and footer elements.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Sets theme overrides for the BackColor property across all visual states of the group box elements.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets theme overrides for the ForeColor property across the group box header and footer elements.
Declaration
protected override void SetForeColorThemeOverrides()