RadTitleBar
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, ISupportRootUIAutomation
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadTitleBar...
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadTitleBar class with default settings.
public RadTitleBar()
Properties
Gets or sets a value indicating whether the parent form can be resized through the title bar.
[Browsable(true)]
public bool AllowResize { get; set; }
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.
public bool CanManageOwnerForm { get; set; }
Gets the default size of the RadTitleBar control.
protected override Size DefaultSize { get; }
A Size representing the default dimensions (220x23 pixels).
Overrides:
Gets or sets a value indicating whether UI Automation support is enabled for this title bar control. When enabled, screen readers and other accessibility tools can interact with the control.
public override bool EnableUIAutomation { get; set; }
Overrides:
Implements:
Gets or sets the icon displayed in the title bar.
public Icon ImageIcon { get; set; }
Gets or sets the image displayed on the left side of the title bar background.
public Image LeftImage { get; set; }
Gets or sets the image displayed on the right side of the title bar background.
public Image RightImage { get; set; }
Gets or sets the text displayed in the title bar caption.
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Overrides:
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.
[Browsable(false)]
public RadTitleBarElement TitleBarElement { get; }
Methods
Creates an accessibility object for the RadTitleBar control.
protected override AccessibleObject CreateAccessibilityInstance()
An AccessibleObject that provides accessibility support for the control.
Overrides:
Creates the child elements for the RadTitleBar control.
protected override void CreateChildItems(RadElement parent)
The parent RadElement that will contain the child elements.
Overrides:
Creates a new instance of RadTitleBarElement for this control.
protected virtual RadTitleBarElement CreateTitleBarElement()
A new RadTitleBarElement instance.
Raises the BackgroundImageChanged event and updates the title bar element's middle image.
Handles the maximize/restore operation by raising the MaximizeRestore event and toggling the parent form's window state.
Handles the minimize to system tray operation by raising the MinimizeInTheTray event.
Raises the ParentChanged event and manages form association and event subscriptions.
Raises the TextChanged event and updates the title bar element text.
Resets the background color theme overrides for the title bar element.
protected override void ResetBackColorThemeOverrides()
Overrides:
Resets the foreground color theme overrides for the title bar element.
protected override void ResetForeColorThemeOverrides()
Overrides:
Sets the background color theme overrides for the title bar element.
protected override void SetBackColorThemeOverrides()
Overrides:
Sets the foreground color theme overrides for the title bar element.
protected override void SetForeColorThemeOverrides()
Overrides:
Events
Occurs when the close button is clicked or a close action is triggered.
public event TitleBarSystemEventHandler Close
Occurs when the maximize/restore button is clicked, the title bar is double-clicked, or a maximize/restore action is triggered.
public event TitleBarSystemEventHandler MaximizeRestore
Occurs when the minimize button is clicked or a minimize action is triggered.
public event TitleBarSystemEventHandler Minimize
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.
public event TitleBarSystemEventHandler MinimizeInTheTray