RadDropDownButton
Represents a drop down button. Essentially the RadDropDownButton class is a simple wrapper for RadDropDownButtonElement.
You can set items that appear when the drop down button is pressed. Also you can configure the visual appearance in numerous ways through themes.
The RadDropDownButtonElement class implements all UI and logic functionality. The RadDropDownButton acts to transfer the events to and from its RadDropDownButtonElementinstance.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[DefaultBindingProperty("Text")]
public class RadDropDownButton : RadControl, IDropTarget, ISynchronizeInvoke, IWin32Window, IBindableComponent, IComponent, IDisposable, INotifyPropertyChanged, ISupportInitializeNotification, ISupportInitialize, IComponentTreeHandler, ILayoutHandler, IAnalyticsProvider
Inheritance: objectMarshalByRefObjectComponentControlScrollableControlRadControlRadDropDownButton...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadDropDownButton class.
public RadDropDownButton()
Properties
Indicates focus cues display, when available, based on the corresponding control type and the current UI state.
[Browsable(true)]
public override bool AllowShowFocusCues { get; set; }
Overrides:
Gets or sets the direction of the arrow shown on the button.
[Browsable(true)]
public ArrowDirection ArrowDirection { get; set; }
An ArrowDirection value that determines the arrow's direction. The default is Down.
Gets the default control size of 140 by 24 pixels.
protected override Size DefaultSize { get; }
Overrides:
Gets or sets the display style that determines how text and images are shown on the button. Controls whether the button displays text only, image only, or both text and image.
[Browsable(true)]
public virtual DisplayStyle DisplayStyle { get; set; }
One of the DisplayStyle values. The default is ImageAndText.
Gets the RadDropDownButtonElement that represents the visual element of this drop-down button control. This element contains the visual styling and drop-down behavior logic for the button.
[Browsable(false)]
public RadDropDownButtonElement DropDownButtonElement { get; }
A RadDropDownButtonElement that represents the button's visual element.
Gets or sets the direction in which the dropdown menu opens.
[Browsable(true)]
public RadDirection DropDownDirection { get; set; }
A RadDirection value that determines the dropdown direction. The default is Down.
public ContentAlignment ImageAlignment { get; set; }
[RelatedImageList("ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.3.1026.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public int ImageIndex { get; set; }
[RelatedImageList("ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.RadImageKeyConverter, Telerik.WinControls.UI.Design, Version=2026.3.1026.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual string ImageKey { get; set; }
Gets a value indicating whether the button is currently pressed.
[Browsable(false)]
public bool IsPressed { get; }
true if the button is pressed; otherwise, false.
Gets the collection of items displayed in the dropdown menu.
[RadEditItemsAction]
public virtual RadItemOwnerCollection Items { get; }
A RadItemOwnerCollection containing the items in the dropdown menu.
Gets or sets a value indicating whether the dropdown arrow is displayed on the button.
[Browsable(true)]
public bool ShowArrow { get; set; }
true to show the dropdown arrow; otherwise, false.
Gets or sets the Svg Image.
public RadSvgImage SvgImage { get; set; }
Gets or sets the text value that is displayed on the button.
[Bindable(true)]
[SettingsBindable(true)]
public override string Text { get; set; }
Overrides:
public ContentAlignment TextAlignment { get; set; }
public TextImageRelation TextImageRelation { get; set; }
Methods
Indicates whether this control supplies theme settings for its drop-down element and button elements.
public override bool ControlDefinesThemeForElement(RadElement element)
The element whose theme ownership is being checked.
Returns:true only when element has runtime type RadDropDownButtonElement or RadButtonElement.
Overrides:
Uses the standard accessibility object unless Telerik accessibility objects are enabled, in which case the custom object exposes the button and its drop-down child.
protected override AccessibleObject CreateAccessibilityInstance()
The accessibility object for this control.
Overrides:
Override this method to create custom main element. By default the main element is an instance of RadDropDownButtonElement.
protected virtual RadDropDownButtonElement CreateButtonElement()
Instance of the one-and-only child of the root element of RadDropDownButton.
Creates and initializes the child elements of the drop-down button.
protected override void CreateChildItems(RadElement parent)
The parent RadElement to which child elements will be added.
Overrides:
Detaches the drop-down event handlers from the child element before disposing the control.
protected override void Dispose(bool disposing)
Whether managed resources should be released.
Overrides:
public virtual void HideDropDown()
Forwards focus to the drop-down button element after the control receives focus.
protected override void OnGotFocus(EventArgs e)
The event data for the focus change.
Overrides:
Closes an open drop-down on focus loss unless the pointer is within the menu or its last activated popup.
protected override void OnLostFocus(EventArgs e)
The event data for the focus change.
Overrides:
Reapplies the action button's current visual state after the control's theme changes.
protected override void OnThemeChanged()
Overrides:
Handles coded-UI queries for the menu item count and whether the button has child nodes; other requests are passed to the base implementation.
protected override void ProcessCodedUIMessage(ref IPCMessage request)
The coded-UI message to process; handled query results are written to its data.
Overrides:
Removes the control's background-color and solid-fill theme overrides from the drop-down button element.
protected override void ResetBackColorThemeOverrides()
Overrides:
Removes foreground-color overrides from the drop-down and action-button elements, resets the action button's child style value, then reapplies theme settings.
protected override void ResetForeColorThemeOverrides()
Overrides:
Applies the control's BackColor to the button and arrow fills in every available visual state, using solid fills.
protected override void SetBackColorThemeOverrides()
Overrides:
Applies the control's ForeColor to the drop-down button and action-button text across their visual states.
protected override void SetForeColorThemeOverrides()
Overrides:
public virtual void ShowDropDown()
Events
[Browsable(true)]
public event EventHandler DropDownClosed
[Browsable(true)]
public event EventHandler DropDownOpened
[Browsable(true)]
public event EventHandler DropDownOpening