ClassRadTabbedFormControl
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.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[TelerikToolboxCategory("Containers")]
public class RadTabbedFormControl : RadNCEnabledControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadNonClientUIControlRadNCEnabledControlRadTabbedFormControl
Implements:
Inherited Members
Constructors
RadTabbedFormControl()
Initializes a new instance of the RadTabbedFormControl class with default settings for tabbed form functionality.
Declaration
public RadTabbedFormControl()
Properties
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
Overrides
CaptionHeight
Gets or sets the height of the extended title bar area that contains the tabs and caption elements.
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
[Browsable(false)]
public bool CausesValidation { get; set; }
Property Value
CloseButton
Gets or sets a value indicating whether the tabbed form displays a close button in its caption area.
DefaultSize
Gets the default size of the tabbed form control when no explicit size is specified.
Declaration
protected override Size DefaultSize { get; }
Property Value
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
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
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
LeftItems
Gets the collection of items displayed on the left side of the tabbed form control's caption area, providing quick access functionality.
Declaration
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection LeftItems { get; }
Property Value
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
[Browsable(true)]
public RadQuickAccessToolBar LeftItemsContainer { get; }
Property Value
MaximizeButton
Gets or sets a value indicating whether the tabbed form displays a maximize button in its caption area.
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
Overrides
MinimizeButton
Gets or sets a value indicating whether the tabbed form displays a minimize button in its caption area.
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
Overrides
MinimumTabWidth
Gets or sets the minimum width that tabs can be resized to, ensuring tabs remain readable and functional.
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
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
[Browsable(true)]
[RadEditItemsAction]
[RadNewItem("Type here", true, false)]
public virtual RadItemOwnerCollection RightItems { get; }
Property Value
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
[Browsable(true)]
public RadQuickAccessToolBar RightItemsContainer { get; }
Property Value
SelectedTab
Gets or sets the RadTabbedFormControlTab instance that is currently selected and active in the tabbed form control.
Declaration
[Browsable(false)]
public RadTabbedFormControlTab SelectedTab { get; set; }
Property Value
ShowIcon
Gets or sets a value indicating whether the form icon is displayed in the caption bar area of the tabbed form control.
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
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
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
ShowText
Gets or sets a value indicating whether the element holding the form title text is visible in the caption area.
SmallImageList
Gets or sets the collection of small images used throughout the tabbed form control for icons and visual elements.
Declaration
[Browsable(true)]
public override ImageList SmallImageList { get; set; }
Property Value
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
Overrides
TabHeight
Gets or sets the default height for all tabs in the tabbed form control, affecting the overall appearance of the tab strip.
TabSpacing
Gets or sets the spacing between individual tabs in the tab strip, controlling the visual separation between tabs.
TabWidth
Gets or sets the default width for all tabs in the tabbed form control, determining the initial size of new tabs.
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
[Browsable(false)]
public RadTabbedFormControlElement TabbedFormControlElement { get; }
Property Value
TabbedFormControlTabsElement
Gets the RadTabbedFormControlTabsElement element that manages the display and layout of tabs within the tabbed form control.
Declaration
[Browsable(true)]
public RadTabbedFormControlTabsElement TabbedFormControlTabsElement { get; }
Property Value
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
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
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
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
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
A new RadTabbedFormControlAccessibilityObject if accessibility objects are enabled; otherwise, the base accessibility object.
Overrides
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
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
A new RadTabbedFormControlCollection instance that manages child controls.
Overrides
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
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(bool)
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
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
rootElement
The root element to initialize with tabbed form specific configuration.
Overrides
OnKeyDown(KeyEventArgs)
Raises the KeyDown event and processes keyboard shortcuts and navigation for the tabbed form control.
Declaration
protected override void OnKeyDown(KeyEventArgs e)
Parameters
e
A 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
e
RadTabbedFormControlNewTabRequestedEventArgs
A RadTabbedFormControlNewTabRequestedEventArgs that contains the event data.
OnParentChanged(EventArgs)
Raises the ParentChanged event and handles parent form text synchronization setup.
OnRightToLeftChanged(EventArgs)
Raises the RightToLeftChanged event and updates the layout to reflect right-to-left reading order changes.
OnSelectedTabChanged(EventArgs)
Raises the SelectedTabChanged event and performs analytics tracking for the tab selection change.
OnSelectedTabChanging(RadTabbedFormControlCancelEventArgs)
Raises the SelectedTabChanging event, allowing subscribers to validate or cancel the tab selection change.
Declaration
protected virtual void OnSelectedTabChanging(RadTabbedFormControlCancelEventArgs e)
Parameters
e
RadTabbedFormControlCancelEventArgs
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
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
e
RadTabbedFormControlCancelEventArgs
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
e
RadTabbedFormControlIndexChangedEventArgs
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
e
RadTabbedFormControlIndexChangingEventArgs
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
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
e
RadTabbedFormControlCancelEventArgs
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.
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
e
A 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
request
IPCMessage
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.
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
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.
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 Value
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 Value
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 Value
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 Value
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 Value
SelectedTabChanged
Occurs when the currently selected tab has changed, providing notification that a new tab is now active and selected.
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 Value
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 Value
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 Value
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 Value
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 Value
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 Value
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 Value
TabsCleared
Occurs when all tabs have been successfully removed from the control, providing notification that the clear operation completed successfully.
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 Value