Class RadTabbedFormControl
Represents a tabbed form control that provides a collection of tabs painted in the non-client area with associated containers for hosting other controls. This control serves as the foundation for creating tabbed interfaces with integrated caption bars, system buttons, and draggable tab functionality.
Inherited Members
Namespace: Telerik.WinControls.UI
Assembly: Telerik.WinControls.UI.dll
Syntax
[TelerikToolboxCategory("Containers")]
public class RadTabbedFormControl : RadNCEnabledControl, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IPCHost, IAnalyticsProvider
Constructors
RadTabbedFormControl()
Initializes a new instance of the RadTabbedFormControl class with default settings for tabbed form functionality.
Declaration
public RadTabbedFormControl()
Properties
AutoSize
This property is not relevant for this control.
Declaration
public override bool AutoSize { get; set; }
Property Value
|
System.Boolean
|
Overrides
BackColor
This property is not relevant for this control.
Declaration
public override Color BackColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
CanRaiseEvents
Gets a value indicating whether event raising is currently enabled for this control, taking into account the suspend events counter.
Declaration
protected override bool CanRaiseEvents { get; }
Property Value
|
System.Boolean
|
CaptionHeight
Gets or sets the height of the extended title bar area that contains the tabs and caption elements.
Declaration
public virtual int CaptionHeight { get; set; }
Property Value
|
System.Int32
|
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
|
CloseButton
Gets or sets a value indicating whether the tabbed form displays a close button in its caption area.
Declaration
public bool CloseButton { get; set; }
Property Value
|
System.Boolean
|
DefaultSize
Gets the default size of the tabbed form control when no explicit size is specified.
Declaration
protected override Size DefaultSize { get; }
Property Value
|
System.Drawing.Size
|
Dock
This property is not relevant for this control.
Declaration
public override DockStyle Dock { get; set; }
Property Value
|
System.Windows.Forms.DockStyle
|
ForeColor
This property is not relevant for this control.
Declaration
public override Color ForeColor { get; set; }
Property Value
|
System.Drawing.Color
|
Overrides
HelpButtonElement
Gets the help button element from the form's caption area, providing access to context-sensitive help functionality.
Declaration
public override RadItem HelpButtonElement { get; }
Property Value
|
RadItem
|
Overrides
IconCaptionElement
Gets the icon caption element that represents the form's icon in the title bar area of the tabbed form control.
Declaration
public override ImagePrimitive IconCaptionElement { get; }
Property Value
|
ImagePrimitive
|
Overrides
ItemDragMode
Gets or sets the drag mode for tabs, determining when and how tab drag operations are initiated by the user.
Declaration
public TabItemDragMode ItemDragMode { get; set; }
Property Value
|
TabItemDragMode
|
LeftItems
Gets the collection of items displayed on the left side of the tabbed form control's caption area, providing quick access functionality.
Declaration
[RadEditItemsAction]
[RadDescription("QuickAccessMenuItems", typeof(RadTabbedFormControlElement))]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection LeftItems { get; }
Property Value
|
RadItemOwnerCollection
|
LeftItemsContainer
Gets the left items container element that hosts quick access items on the left side of the tabbed form control's caption area.
Declaration
public RadQuickAccessToolBar LeftItemsContainer { get; }
Property Value
|
RadQuickAccessToolBar
|
MaximizeButton
Gets or sets a value indicating whether the tabbed form displays a maximize button in its caption area.
Declaration
public bool MaximizeButton { get; set; }
Property Value
|
System.Boolean
|
MaximizeButtonElement
Gets the maximize button element from the form's caption area, providing access to the system maximize/restore functionality.
Declaration
public override RadItem MaximizeButtonElement { get; }
Property Value
|
RadItem
|
Overrides
MinimizeButton
Gets or sets a value indicating whether the tabbed form displays a minimize button in its caption area.
Declaration
public bool MinimizeButton { get; set; }
Property Value
|
System.Boolean
|
MinimizeButtonElement
Gets the minimize button element from the form's caption area, providing access to the system minimize functionality.
Declaration
public override RadItem MinimizeButtonElement { get; }
Property Value
|
RadItem
|
Overrides
MinimumTabWidth
Gets or sets the minimum width that tabs can be resized to, ensuring tabs remain readable and functional.
Declaration
public virtual int MinimumTabWidth { get; set; }
Property Value
|
System.Int32
|
PinnedItemsPosition
Gets or sets the position where pinned tabs will be displayed relative to regular tabs in the title bar area.
Declaration
public virtual PinnedItemsPosition PinnedItemsPosition { get; set; }
Property Value
|
PinnedItemsPosition
|
RightItems
Gets the collection of items displayed on the right side of the tabbed form control's caption area, providing additional quick access functionality.
Declaration
[RadEditItemsAction]
[RadDescription("QuickAccessMenuItems", typeof(RadTabbedFormControlElement))]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection RightItems { get; }
Property Value
|
RadItemOwnerCollection
|
RightItemsContainer
Gets the right items container element that hosts quick access items on the right side of the tabbed form control's caption area.
Declaration
public RadQuickAccessToolBar RightItemsContainer { get; }
Property Value
|
RadQuickAccessToolBar
|
SelectedTab
Gets or sets the RadTabbedFormControlTab instance that is currently selected and active in the tabbed form control.
Declaration
public RadTabbedFormControlTab SelectedTab { get; set; }
Property Value
|
RadTabbedFormControlTab
|
ShowIcon
Gets or sets a value indicating whether the form icon is displayed in the caption bar area of the tabbed form control.
Declaration
public virtual bool ShowIcon { get; set; }
Property Value
|
System.Boolean
|
ShowNewTabButton
Gets or sets a value indicating whether the new tab button is visible, allowing users to create new tabs through the UI.
Declaration
public virtual bool ShowNewTabButton { get; set; }
Property Value
|
System.Boolean
|
ShowTabCloseButton
Gets or sets a value indicating whether close buttons are displayed on individual tabs, allowing users to close tabs directly.
Declaration
public virtual bool ShowTabCloseButton { get; set; }
Property Value
|
System.Boolean
|
ShowTabPinButton
Gets or sets a value indicating whether pin buttons are displayed on individual tabs, allowing users to pin tabs for persistent visibility.
Declaration
public virtual bool ShowTabPinButton { get; set; }
Property Value
|
System.Boolean
|
ShowText
Gets or sets a value indicating whether the element holding the form title text is visible in the caption area.
Declaration
public virtual bool ShowText { get; set; }
Property Value
|
System.Boolean
|
SmallImageList
Gets or sets the collection of small images used throughout the tabbed form control for icons and visual elements.
Declaration
public override ImageList SmallImageList { get; set; }
Property Value
|
System.Windows.Forms.ImageList
|
Overrides
SystemButtonsElement
Gets the system buttons element container from the form's caption area, which houses the minimize, maximize, and close buttons.
Declaration
public override RadItem SystemButtonsElement { get; }
Property Value
|
RadItem
|
Overrides
TabbedFormControlElement
Gets the instance of RadTabbedFormControlElement wrapped by this control. The RadTabbedFormControlElement is the main element in the hierarchy tree and encapsulates the actual functionality of the RadTabbedFormControl.
Declaration
public RadTabbedFormControlElement TabbedFormControlElement { get; }
Property Value
|
RadTabbedFormControlElement
|
TabbedFormControlTabsElement
Gets the RadTabbedFormControlTabsElement element that manages the display and layout of tabs within the tabbed form control.
Declaration
public RadTabbedFormControlTabsElement TabbedFormControlTabsElement { get; }
Property Value
|
RadTabbedFormControlTabsElement
|
TabHeight
Gets or sets the default height for all tabs in the tabbed form control, affecting the overall appearance of the tab strip.
Declaration
public virtual int TabHeight { get; set; }
Property Value
|
System.Int32
|
Tabs
Gets the collection of tabs managed by this tabbed form control, providing access to add, remove, and manipulate individual tabs.
Declaration
public RadTabbedFormControlTabCollection Tabs { get; }
Property Value
|
RadTabbedFormControlTabCollection
|
TabSpacing
Gets or sets the spacing between individual tabs in the tab strip, controlling the visual separation between tabs.
Declaration
public virtual int TabSpacing { get; set; }
Property Value
|
System.Int32
|
TabWidth
Gets or sets the default width for all tabs in the tabbed form control, determining the initial size of new tabs.
Declaration
public virtual int TabWidth { get; set; }
Property Value
|
System.Int32
|
Text
Gets or sets the text displayed in the caption area of the tabbed form control, typically representing the form title.
Declaration
public override string Text { get; set; }
Property Value
|
System.String
|
Overrides
TextCaptionElement
Gets the text caption element that displays the form's title text in the caption area of the tabbed form control.
Declaration
public override RadElement TextCaptionElement { get; }
Property Value
|
RadElement
|
Overrides
ThemeClassName
Gets the theme class name for the control, which is used by the theming system to apply appropriate visual styles.
Declaration
public override string ThemeClassName { get; }
Property Value
|
System.String
|
Overrides
Methods
Construct()
Constructs the control by initializing its default settings and creating the tabs collection that will hold all tabbed form control tabs.
Declaration
protected override void Construct()
Overrides
CreateAccessibilityInstance()
Creates a new accessibility object for the control to support screen readers and automation tools.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
|
System.Windows.Forms.AccessibleObject
A new RadTabbedFormControlAccessibilityObject if accessibility objects are enabled; otherwise, the base accessibility object. |
CreateChildItems(RadElement)
Creates the child elements of the control, including the main tabbed form control element that provides the core tabbed interface functionality.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
|
RadElement
parent
The parent element to which child elements will be added in the element hierarchy. |
Overrides
CreateControlsInstance()
Creates a new instance of the control collection specifically designed for this tabbed form control.
Declaration
protected override Control.ControlCollection CreateControlsInstance()
Returns
|
System.Windows.Forms.Control.ControlCollection
A new RadTabbedFormControlCollection instance that manages child controls. |
CreateTabbedFormControlElement()
Creates the main tabbed form control element that provides the core functionality for tab management, caption handling, and user interaction.
Declaration
protected virtual RadTabbedFormControlElement CreateTabbedFormControlElement()
Returns
|
RadTabbedFormControlElement
A new instance of RadTabbedFormControlElement configured for this control. |
CreateTabsInstance()
Creates a new instance of the tabs collection that will manage all tabs within this tabbed form control.
Declaration
protected virtual RadTabbedFormControlTabCollection CreateTabsInstance()
Returns
|
RadTabbedFormControlTabCollection
A new RadTabbedFormControlTabCollection instance configured for this control. |
Dispose(Boolean)
Releases the unmanaged resources used by the RadTabbedFormControl and optionally releases the managed resources, including cleanup of parent form event handlers.
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
InitializeRootElement(RootRadElement)
Initializes the root element of the control and performs any additional setup required for the tabbed form control element hierarchy.
Declaration
protected override void InitializeRootElement(RootRadElement rootElement)
Parameters
|
RootRadElement
rootElement
The root element to initialize with tabbed form specific configuration. |
Overrides
OnKeyDown(KeyEventArgs)
Raises the System.Windows.Forms.Control.KeyDown event and processes keyboard shortcuts and navigation for the tabbed form control.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
|
System.Windows.Forms.KeyEventArgs
e
A System.Windows.Forms.KeyEventArgs that contains the event data. |
Overrides
OnNewTabRequested(RadTabbedFormControlNewTabRequestedEventArgs)
Raises the NewTabRequested event when the user requests a new tab through the user interface.
Declaration
protected virtual void OnNewTabRequested(RadTabbedFormControlNewTabRequestedEventArgs e)
Parameters
|
RadTabbedFormControlNewTabRequestedEventArgs
e
A RadTabbedFormControlNewTabRequestedEventArgs that contains the event data. |
OnParentChanged(EventArgs)
Raises the System.Windows.Forms.Control.ParentChanged event and handles parent form text synchronization setup.
Declaration
protected override void OnParentChanged(EventArgs e)
Parameters
|
System.EventArgs
e
An System.EventArgs that contains the event data. |
Overrides
OnRightToLeftChanged(EventArgs)
Raises the System.Windows.Forms.Control.RightToLeftChanged event and updates the layout to reflect right-to-left reading order changes.
Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
|
System.EventArgs
e
An System.EventArgs that contains the event data. |
Overrides
OnSelectedTabChanged(EventArgs)
Raises the SelectedTabChanged event and performs analytics tracking for the tab selection change.
Declaration
protected virtual void OnSelectedTabChanged(EventArgs e)
Parameters
|
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnSelectedTabChanging(RadTabbedFormControlCancelEventArgs)
Raises the SelectedTabChanging event, allowing subscribers to validate or cancel the tab selection change.
Declaration
protected virtual void OnSelectedTabChanging(RadTabbedFormControlCancelEventArgs e)
Parameters
|
RadTabbedFormControlCancelEventArgs
e
A RadTabbedFormControlCancelEventArgs that contains the event data and allows cancellation. |
OnTabAdded(RadTabbedFormControlEventArgs)
Raises the TabAdded event after a tab has been successfully added to the control.
Declaration
protected virtual void OnTabAdded(RadTabbedFormControlEventArgs e)
Parameters
|
RadTabbedFormControlEventArgs
e
A RadTabbedFormControlEventArgs that contains the event data for the added tab. |
OnTabAdding(RadTabbedFormControlCancelEventArgs)
Raises the TabAdding event before a tab is added to the control, allowing validation and cancellation.
Declaration
protected virtual void OnTabAdding(RadTabbedFormControlCancelEventArgs e)
Parameters
|
RadTabbedFormControlCancelEventArgs
e
A RadTabbedFormControlCancelEventArgs that contains the event data and allows cancellation. |
OnTabIndexChanged(RadTabbedFormControlIndexChangedEventArgs)
Raises the TabItemIndexChanged event after a tab's index position has been successfully changed.
Declaration
protected virtual void OnTabIndexChanged(RadTabbedFormControlIndexChangedEventArgs e)
Parameters
|
RadTabbedFormControlIndexChangedEventArgs
e
A RadTabbedFormControlIndexChangedEventArgs that contains the event data for the index change. |
OnTabIndexChanging(RadTabbedFormControlIndexChangingEventArgs)
Raises the TabItemIndexChanging event before a tab's index position changes, allowing validation and cancellation.
Declaration
protected virtual void OnTabIndexChanging(RadTabbedFormControlIndexChangingEventArgs e)
Parameters
|
RadTabbedFormControlIndexChangingEventArgs
e
A RadTabbedFormControlIndexChangingEventArgs that contains the event data and allows cancellation. |
OnTabRemoved(RadTabbedFormControlEventArgs)
Raises the TabRemoved event after a tab has been successfully removed from the control, and handles automatic form closure when no tabs remain.
Declaration
protected virtual void OnTabRemoved(RadTabbedFormControlEventArgs e)
Parameters
|
RadTabbedFormControlEventArgs
e
A RadTabbedFormControlEventArgs that contains the event data for the removed tab. |
OnTabRemoving(RadTabbedFormControlCancelEventArgs)
Raises the TabRemoving event before a tab is removed from the control, allowing validation and cancellation.
Declaration
protected virtual void OnTabRemoving(RadTabbedFormControlCancelEventArgs e)
Parameters
|
RadTabbedFormControlCancelEventArgs
e
A RadTabbedFormControlCancelEventArgs that contains the event data and allows cancellation. |
OnTabsCleared(EventArgs)
Raises the TabsCleared event after all tabs have been successfully removed from the control.
Declaration
protected virtual void OnTabsCleared(EventArgs e)
Parameters
|
System.EventArgs
e
An System.EventArgs that contains the event data. |
OnTabsClearing(CancelEventArgs)
Raises the TabsClearing event before all tabs are removed from the control, allowing validation and cancellation.
Declaration
protected virtual void OnTabsClearing(CancelEventArgs e)
Parameters
|
System.ComponentModel.CancelEventArgs
e
A System.ComponentModel.CancelEventArgs that allows cancellation of the clear operation. |
ProcessCodedUIMessage(ref IPCMessage)
Processes CodedUI messages for automation and testing purposes, handling tab selection, property retrieval, and other automation commands.
Declaration
protected override void ProcessCodedUIMessage(ref IPCMessage request)
Parameters
|
IPCMessage
request
The CodedUI message to process, containing the automation command and parameters. |
Overrides
ProcessParentNotifyMessage(ref Message)
Processes parent notification messages for the control, forwarding them to the window procedure for handling.
Declaration
protected virtual void ProcessParentNotifyMessage(ref Message m)
Parameters
|
System.Windows.Forms.Message
m
The Windows System.Windows.Forms.Message to process. |
ResumeEvents()
Resumes event raising for tab-related events, previously suspended by a SuspendEvents() call. Events will be raised normally after this call.
Declaration
public void ResumeEvents()
SetSelectedTab(RadTabbedFormControlEventArgs)
Sets the selected tab and performs the necessary layout operations to reflect the change in the user interface.
Declaration
protected virtual void SetSelectedTab(RadTabbedFormControlEventArgs e)
Parameters
|
RadTabbedFormControlEventArgs
e
A RadTabbedFormControlEventArgs that contains the event data for the tab selection. |
SuspendEvents()
Temporarily suspends event raising for all tab-related events to improve performance during bulk operations.
Declaration
public void SuspendEvents()
WmNCHitTest(ref Message)
Processes Windows messages for hit testing in the non-client area, handling special cases for tabbed form behavior and composition.
Declaration
protected override bool WmNCHitTest(ref Message msg)
Parameters
|
System.Windows.Forms.Message
msg
The Windows System.Windows.Forms.Message to process. |
Returns
|
System.Boolean
true if the message was processed by this method; otherwise, false. |
Overrides
Events
ContextMenuOpening
Occurs when the context menu is about to be opened for a tab item, providing an opportunity to customize the context menu contents or cancel the operation.
Declaration
public event EventHandler<RadTabbedFormControlItemConextMenuOpeningEventArgs> ContextMenuOpening
Event Type
|
System.EventHandler<RadTabbedFormControlItemConextMenuOpeningEventArgs>
|
ItemCreating
Occurs when a new tab item is about to be created, allowing customization of the tab creation process and initial properties.
Declaration
public event EventHandler<RadTabbedFormControlItemCreatingEventArgs> ItemCreating
Event Type
|
System.EventHandler<RadTabbedFormControlItemCreatingEventArgs>
|
ItemDropped
Occurs when a tab item has been successfully dropped over another item, completing the drag and drop operation. This event provides notification of the completed drop action.
Declaration
public event EventHandler<RadTabbedFormControlItemDroppedEventArgs> ItemDropped
Event Type
|
System.EventHandler<RadTabbedFormControlItemDroppedEventArgs>
|
ItemDropping
Occurs when a tab item is about to be dropped over another item during a drag and drop operation. This event allows customization of the drop behavior.
Declaration
public event EventHandler<RadTabbedFormControlItemDroppingEventArgs> ItemDropping
Event Type
|
System.EventHandler<RadTabbedFormControlItemDroppingEventArgs>
|
NewTabRequested
Occurs when a new tab is requested by the user, typically through clicking a new tab button or similar UI element.
Declaration
public event EventHandler<RadTabbedFormControlNewTabRequestedEventArgs> NewTabRequested
Event Type
|
System.EventHandler<RadTabbedFormControlNewTabRequestedEventArgs>
|
SelectedTabChanged
Occurs when the currently selected tab has changed, providing notification that a new tab is now active and selected.
Declaration
public event EventHandler SelectedTabChanged
Event Type
|
System.EventHandler
|
SelectedTabChanging
Occurs when the currently selected tab is about to change. This event is cancelable and allows validation or cleanup before the selection changes.
Declaration
public event EventHandler<RadTabbedFormControlCancelEventArgs> SelectedTabChanging
Event Type
|
System.EventHandler<RadTabbedFormControlCancelEventArgs>
|
TabAdded
Occurs when a new tab has been successfully added to the control, providing notification that the addition operation completed successfully.
Declaration
public event EventHandler<RadTabbedFormControlEventArgs> TabAdded
Event Type
|
System.EventHandler<RadTabbedFormControlEventArgs>
|
TabAdding
Occurs when a new tab is about to be added to the control. This event is cancelable and allows validation or modification before the tab is added.
Declaration
public event EventHandler<RadTabbedFormControlCancelEventArgs> TabAdding
Event Type
|
System.EventHandler<RadTabbedFormControlCancelEventArgs>
|
TabItemIndexChanged
Occurs when a tab's index position has been successfully changed within the tab collection, providing notification of the completed index change operation.
Declaration
public event EventHandler<RadTabbedFormControlIndexChangedEventArgs> TabItemIndexChanged
Event Type
|
System.EventHandler<RadTabbedFormControlIndexChangedEventArgs>
|
TabItemIndexChanging
Occurs when a tab is about to change its index position within the tab collection. This event is cancelable and allows validation of the index change.
Declaration
public event EventHandler<RadTabbedFormControlIndexChangingEventArgs> TabItemIndexChanging
Event Type
|
System.EventHandler<RadTabbedFormControlIndexChangingEventArgs>
|
TabRemoved
Occurs when a tab has been successfully removed from the control, providing notification that the removal operation completed successfully.
Declaration
public event EventHandler<RadTabbedFormControlEventArgs> TabRemoved
Event Type
|
System.EventHandler<RadTabbedFormControlEventArgs>
|
TabRemoving
Occurs when a tab is about to be removed from the control. This event is cancelable and allows validation or cleanup operations before removal.
Declaration
public event EventHandler<RadTabbedFormControlCancelEventArgs> TabRemoving
Event Type
|
System.EventHandler<RadTabbedFormControlCancelEventArgs>
|
TabsCleared
Occurs when all tabs have been successfully removed from the control, providing notification that the clear operation completed successfully.
Declaration
public event EventHandler TabsCleared
Event Type
|
System.EventHandler
|
TabsClearing
Occurs when all tabs are about to be removed from the control. This event is cancelable and allows validation or bulk cleanup operations before clearing.
Declaration
public event CancelEventHandler TabsClearing
Event Type
|
System.ComponentModel.CancelEventHandler
|