ClassRadTitleBar
Represents a title bar control that provides custom window management functionality. This control helps in creating borderless forms by substituting the system title bar. Subscribe to RadTitleBar events to implement custom actions for window operations. Use the Visual Style Builder to change the default appearance and configure visible elements.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[Docking(DockingBehavior.Ask)]
public class RadTitleBar : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadTitleBar
Implements:
Inherited Members
Constructors
RadTitleBar()
Initializes a new instance of the RadTitleBar class with default settings.
Declaration
public RadTitleBar()
Properties
AllowResize
Gets or sets a value indicating whether the parent form can be resized through the title bar.
Declaration
[Browsable(true)]
public bool AllowResize { get; set; }
Property Value
CanManageOwnerForm
Gets or sets a value indicating whether the title bar can manage the parent form's window operations. When enabled, the title bar will handle form moving, resizing, and state changes.
DefaultSize
Gets the default size of the RadTitleBar control.
ImageIcon
Gets or sets the icon displayed in the title bar.
LeftImage
Gets or sets the image displayed on the left side of the title bar background.
RightImage
Gets or sets the image displayed on the right side of the title bar background.
Text
Gets or sets the text displayed in the title bar caption.
Declaration
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Property Value
Overrides
TitleBarElement
Gets the RadTitleBarElement instance that represents the main element in the hierarchy. This element encapsulates the actual functionality and UI logic of the RadTitleBar control.
Declaration
[Browsable(false)]
public RadTitleBarElement TitleBarElement { get; }
Property Value
Methods
CreateAccessibilityInstance()
Creates an accessibility object for the RadTitleBar control.
Declaration
protected override AccessibleObject CreateAccessibilityInstance()
Returns
An AccessibleObject that provides accessibility support for the control.
Overrides
CreateChildItems(RadElement)
Creates the child elements for the RadTitleBar control.
Declaration
protected override void CreateChildItems(RadElement parent)
Parameters
parent
The parent RadElement that will contain the child elements.
Overrides
CreateTitleBarElement()
Creates a new instance of RadTitleBarElement for this control.
Declaration
protected virtual RadTitleBarElement CreateTitleBarElement()
Returns
A new RadTitleBarElement instance.
OnBackgroundImageChanged(EventArgs)
Raises the BackgroundImageChanged event and updates the title bar element's middle image.
OnClose(object, EventArgs)
Handles the close operation by raising the Close event and closing the parent form.
OnHelpButtonClicked(object, EventArgs)
Handles the help button click event by sending a help context message to the parent form.
OnMaximizeRestore(object, EventArgs)
Handles the maximize/restore operation by raising the MaximizeRestore event and toggling the parent form's window state.
OnMinimize(object, EventArgs)
Handles the minimize operation by raising the Minimize event and minimizing the parent form.
OnMinimizeInTheTray(object, EventArgs)
Handles the minimize to system tray operation by raising the MinimizeInTheTray event.
OnMove(object, EventArgs)
Handles the move operation by sending a move message to the parent form.
OnParentChanged(EventArgs)
Raises the ParentChanged event and manages form association and event subscriptions.
OnSize(object, EventArgs)
Handles the size operation by sending a resize message to the parent form.
OnTextChanged(EventArgs)
Raises the TextChanged event and updates the title bar element text.
ResetBackColorThemeOverrides()
Resets the background color theme overrides for the title bar element.
Declaration
protected override void ResetBackColorThemeOverrides()
Overrides
ResetForeColorThemeOverrides()
Resets the foreground color theme overrides for the title bar element.
Declaration
protected override void ResetForeColorThemeOverrides()
Overrides
SetBackColorThemeOverrides()
Sets the background color theme overrides for the title bar element.
Declaration
protected override void SetBackColorThemeOverrides()
Overrides
SetForeColorThemeOverrides()
Sets the foreground color theme overrides for the title bar element.
Declaration
protected override void SetForeColorThemeOverrides()
Overrides
WndProc(ref Message)
Processes Windows messages for the control, with special handling for help cursor operations.
Events
Close
Occurs when the close button is clicked or a close action is triggered.
Declaration
public event TitleBarSystemEventHandler Close
Event Value
MaximizeRestore
Occurs when the maximize/restore button is clicked, the title bar is double-clicked, or a maximize/restore action is triggered.
Declaration
public event TitleBarSystemEventHandler MaximizeRestore
Event Value
Minimize
Occurs when the minimize button is clicked or a minimize action is triggered.
Declaration
public event TitleBarSystemEventHandler Minimize
Event Value
MinimizeInTheTray
Occurs when the minimize to system tray button is clicked. This button is hidden by default. Use the Visual Style Builder to configure which elements are visible and customize their appearance.
Declaration
public event TitleBarSystemEventHandler MinimizeInTheTray
Event Value