Represents a rad dropdown button element. The RadDropDownButton control is a simple wrapper for the RadDropDownButtonElement. All UI and logic functionality is implemented in RadDropDownButtonElement class. The RadDropDownButton acts to transfer events to and from its RadDropDownButtonElement instance. RadDropDownButtonElement can be nested in other telerik controls.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
[ComVisible(false)]
public class RadDropDownButtonElement : RadItem, INotifyPropertyChanged, ICustomTypeDescriptor, ISupportSystemSkin, IBindableComponent, IComponent, IDisposable, ISupportDrag, ISupportDrop, IShortcutProvider, IStylableElement, IStylableNode, IDropDownMenuOwner, ISiteProvider, IItemsOwner, IImageElement
Inheritance: objectDisposableObjectRadObjectRadElementVisualElementRadComponentElementRadItemRadDropDownButtonElement...
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the DropDownButtonElement class.
public RadDropDownButtonElement()
Fields
Identifies how the action button combines its image and text.
public static RadProperty DisplayStyleProperty
Identifies the alignment of the image within the action button.
public static RadProperty ImageAlignmentProperty
Identifies the image-list index used to select the action button's image.
public static RadProperty ImageIndexProperty
Identifies the image-list key used to select the action button's image.
public static RadProperty ImageKeyProperty
Identifies the raster image property rendered in the action button.
public static RadProperty ImageProperty
Identifies the property that tracks whether the drop-down menu is open.
public static RadProperty IsDropDownShownProperty
Identifies the pressed-state property used to render the button's active input state.
public static RadProperty IsPressedProperty
Hosts the action and arrow buttons and provides the layout surface used by derived button elements.
protected DropDownEditorLayoutPanel layoutPanel
mappedStyleProperties
Dictionary<RadProperty, RadProperty>
Maps image-primitive style properties to the corresponding button-item properties used by this element.
public static Dictionary<RadProperty, RadProperty> mappedStyleProperties
Stores the popup menu owned by this element; derived elements can use it to customize popup behavior.
protected RadDropDownButtonPopup menu
Identifies the property that distinguishes pointer-over states for the action and arrow buttons.
public static RadProperty MouseOverStateProperty
Identifies the property that controls visibility of the drop-down arrow button.
public static RadProperty ShowArrowProperty
Identifies the vector image property rendered in the action button.
public static RadProperty SvgImageProperty
Identifies the alignment of the action button's text.
public static RadProperty TextAlignmentProperty
Identifies the layout relationship between the action button's text and image.
public static RadProperty TextImageRelationProperty
Properties
Gets the action button
[Browsable(false)]
public RadButtonElement ActionButton { get; }
Gets the arrow button
[Browsable(false)]
public RadArrowButtonElement ArrowButton { get; }
Gets or sets the minimum size of the arrow button
public Size ArrowButtonMinSize { get; set; }
Gets or sets a value indicating the position where the arrow button appears in drop-down button.
[Browsable(true)]
public virtual DropDownButtonArrowPosition ArrowPosition { get; set; }
Gets or sets whether automatic tooltip behavior is enabled for both the action and arrow buttons.
public override bool AutoToolTip { get; set; }
Overrides:
Gets the border element
[Browsable(false)]
public BorderPrimitive BorderElement { get; }
Specifies the logical combination of image and text primitives in the element.
[Browsable(true)]
public DisplayStyle DisplayStyle { get; set; }
Gets or sets a value indicating the direction in which the dropdown item emerges from its parent container.
[Browsable(true)]
public RadDirection DropDownDirection { get; set; }
Gets or sets value indicating whether DropDownMenu will have the same class name as the owner control or its own. True means that the same class name will be used as the control that opened the dropdown.
public bool DropDownInheritsThemeClassName { get; set; }
Implements:
Gets the drop down menu
[Browsable(false)]
public RadDropDownMenu DropDownMenu { get; }
Gets or sets the expand arrow button
[Browsable(false)]
public bool ExpandArrowButton { get; set; }
Indicates whether the DropDown of the button should have two columns or one column.
[Browsable(true)]
public bool HasTwoColumnDropDown { get; set; }
Gets or sets the image that is displayed on a button element.
[TypeConverter(typeof(ImageTypeConverter))]
public virtual Image Image { get; set; }
Implements:
Gets or sets the alignment of image content on the drawing surface.
public virtual ContentAlignment ImageAlignment { get; set; }
Gets or sets the image list index value of the image displayed on the button control.
[RelatedImageList("ElementTree.Control.ImageList")]
[TypeConverter("Telerik.WinControls.UI.Design.NoneExcludedImageIndexConverter, Telerik.WinControls.UI.Design, Version=2026.3.1026.48, Culture=neutral, PublicKeyToken=5bb2a467cbec794e")]
public virtual int ImageIndex { get; set; }
Implements:
Gets or sets the key accessor for the image in the ImageList.
[RelatedImageList("ElementTree.Control.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; }
Implements:
Gets a value indicating whether the drop down is shown
[Browsable(false)]
public bool IsDropDownShown { get; }
Gets a value indicating whether the button item is in the pressed state.
[Browsable(false)]
public bool IsPressed { get; }
Gets the Items collection where you can add and remove items from the DropDownButton.
[RadEditItemsAction]
public RadItemOwnerCollection Items { get; }
Implements:
Gets the layout panel that arranges the action and arrow buttons and can host derived elements such as a split-button separator.
[Browsable(false)]
public DropDownEditorLayoutPanel Layout { get; }
Gets or sets a value indicating whether an arrow button is displayed on the drop-down buuton.
[Browsable(true)]
public virtual bool ShowArrow { get; set; }
Gets or sets the vector image that is displayed on a button element.
public RadSvgImage SvgImage { get; set; }
Gets or sets the alignment of text content on the drawing surface.
public virtual ContentAlignment TextAlignment { get; set; }
Gets or sets the position of text and image relative to each other.
public virtual TextImageRelation TextImageRelation { get; set; }
Gets or sets the tooltip text and applies it to both the action and arrow buttons.
public override string ToolTipText { get; set; }
Overrides:
Methods
Creates the action and arrow buttons, binds their display properties, and places them in the shared layout.
protected override void CreateChildElements()
Overrides:
Creates the popup menu owned by this element.
protected virtual RadDropDownButtonPopup CreateDropDown()
A popup associated with this element, initialized with the control's image list when the element is attached to a valid tree.
Disposes the popup owned by this element before releasing the base element's managed resources.
protected override void DisposeManagedResources()
Overrides:
Raises the click behavior inherited from RadItem and then invokes ShowDropDownOnClick().
protected override void DoClick(EventArgs e)
The event data associated with the click.
Overrides:
Hides the drop down menu.
public virtual void HideDropDown()
Assigns the theme role used to resolve this element's visual style.
protected override void InitializeFields()
Overrides:
Redirects image style properties to the corresponding RadButtonItem properties.
public override RadProperty MapStyleProperty(RadProperty propertyToMap, string settingType)
The property requested by the style.
settingTypestringThe style setting type passed to the base implementation when no mapping exists.
Returns:The mapped property, or the result returned by the base implementation.
Overrides:
Determines whether the event is passed up in the control hierarchy.
protected override void OnBubbleEvent(RadElement sender, RoutedEventArgs args)
Overrides:
Raises the DropDownClosed event.
Fires when the drop-down of the button is about to close.
protected virtual void OnDropDownClosing(RadPopupClosingEventArgs args)
An instance of the RadPopupClosingEventArgs class that contains information about the event.
Raises the DropDownOpened event.
Raises the DropDownOpening event.
Starts the keyboard pressed state for Space and invokes the button action with Enter when the menu is closed.
protected override void OnKeyDown(KeyEventArgs e)
Key data identifying the key pressed.
Overrides:
Invokes the button action when Space is released and clears the pressed state even if the click handler fails.
protected override void OnKeyUp(KeyEventArgs e)
Key data identifying the key released.
Overrides:
Notifies the nearest ancestor item collection that this element was clicked after processing the mouse release.
protected override void OnMouseUp(MouseEventArgs e)
Mouse data forwarded to the base implementation.
Overrides:
Keeps child state, arrow visibility, and element shapes synchronized with relevant property changes.
protected override void OnPropertyChanged(RadPropertyChangedEventArgs e)
Details of the property change.
Overrides:
Handles designer serialization of SvgImageXml; other properties use the base serialization rules.
public override bool? ShouldSerializeProperty(PropertyDescriptor property)
The property whose serialization status is being queried.
Returns:bool?
For SvgImageXml, true only when an image is present and the value is local or locally bound; otherwise, false. For other properties, the result returned by the base implementation.
Overrides:
Shows the drop down menu.
public virtual void ShowDropDown()
Shows the drop down menu at given location
public virtual void ShowDropDown(Point location)
The upper left corner of the drop down in screen coordinates
Shows the drop-down menu after a click; derived elements can override this hook to change that behavior.
protected virtual void ShowDropDownOnClick()
Events
Occurs when the drop-down window has closed.
[Browsable(true)]
public event EventHandler DropDownClosed
Occurs when the drop-down window is about to close.
[Browsable(true)]
public event RadPopupClosingEventHandler DropDownClosing
Occurs when the drop-down has opened.
[Browsable(true)]
public event EventHandler DropDownOpened
Occurs when the drop-down is opening.
[Browsable(true)]
public event CancelEventHandler DropDownOpening