RadDropDownButton
Represents a customizable drop-down button that combines the functionalities of a standard button and a pop-up. The RadDropDownButton allows for displaying a drop-down content area when clicked, enabling users to select options or display additional information. This control offers features such as:
- Configurable drop-down content and templates
- Options to manage the button's open and close behaviors, including automatic closing on Escape or Enter key presses
- Control of visibility, position, and dimensions of the drop-down area
- Events to handle opening and closing of the drop-down, providing a rich user interaction experience.
The RadDropDownButton is designed for use in UI scenarios where hierarchical options or extended actions need to be displayed without cluttering the main interface.
Definition
Namespace:Telerik.Windows.Controls
Assembly:Telerik.Windows.Controls.dll
Syntax:
[TelerikToolboxCategory("Buttons")]
public class RadDropDownButton : RadButton, IDisposable
Inheritance: objectRadButtonRadDropDownButton
Derived Classes:
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadDropDownButton class.
public RadDropDownButton()
Fields
AutoOpenDelayProperty
DependencyProperty
Identifies the AutoOpenDelay property.
public static readonly DependencyProperty AutoOpenDelayProperty
CloseOnEnterProperty
DependencyProperty
Identifies the CloseOnEnter property.
public static readonly DependencyProperty CloseOnEnterProperty
CloseOnEscapeProperty
DependencyProperty
Identifies the CloseOnEscape property.
public static readonly DependencyProperty CloseOnEscapeProperty
CloseOnPopupMouseLeftButtonUpProperty
DependencyProperty
Identifies the CloseOnPopupMouseLeftButtonUp property.
public static readonly DependencyProperty CloseOnPopupMouseLeftButtonUpProperty
DropDownButtonPositionProperty
DependencyProperty
Identifies the DropDownButtonPosition property.
public static readonly DependencyProperty DropDownButtonPositionProperty
DropDownClosedEvent
RoutedEvent
Identifies the DropDownClosed property.
public static readonly RoutedEvent DropDownClosedEvent
DropDownContentProperty
DependencyProperty
Identifies the DropDownContent property.
public static readonly DependencyProperty DropDownContentProperty
DropDownContentTemplateProperty
DependencyProperty
Identifies the DropDownContentTemplate property.
public static readonly DependencyProperty DropDownContentTemplateProperty
DropDownContentTemplateSelectorProperty
DependencyProperty
Identifies the DropDownContentTemplateSelector property.
public static readonly DependencyProperty DropDownContentTemplateSelectorProperty
DropDownHeightProperty
DependencyProperty
Identifies the PopupHeight property.
public static readonly DependencyProperty DropDownHeightProperty
DropDownHorizontalOffsetProperty
DependencyProperty
Identifies the DropDownHorizontalOffset property.
public static readonly DependencyProperty DropDownHorizontalOffsetProperty
DropDownIndicatorVisibilityProperty
DependencyProperty
Identifies the DropDownContent property.
public static readonly DependencyProperty DropDownIndicatorVisibilityProperty
DropDownMaxHeightProperty
DependencyProperty
Identifies the PopupMaxHeight property.
public static readonly DependencyProperty DropDownMaxHeightProperty
DropDownMaxWidthProperty
DependencyProperty
Identifies the PopupMaxWidth property.
public static readonly DependencyProperty DropDownMaxWidthProperty
DropDownMinHeightProperty
DependencyProperty
Identifies the DropDownMinHeight property.
public static readonly DependencyProperty DropDownMinHeightProperty
DropDownMinWidthProperty
DependencyProperty
Identifies the DropDownMinWidth property.
public static readonly DependencyProperty DropDownMinWidthProperty
DropDownOpenedEvent
RoutedEvent
Identifies the DropDownOpened property.
public static readonly RoutedEvent DropDownOpenedEvent
DropDownOpeningEvent
RoutedEvent
Identifies the DropDownOpening property.
public static readonly RoutedEvent DropDownOpeningEvent
DropDownPlacementProperty
DependencyProperty
Identifies the DropDownPlacement property.
public static readonly DependencyProperty DropDownPlacementProperty
DropDownVerticalOffsetProperty
DependencyProperty
Identifies the DropDownVerticalOffset property.
public static readonly DependencyProperty DropDownVerticalOffsetProperty
DropDownWidthProperty
DependencyProperty
Identifies the PopupWidth property.
public static readonly DependencyProperty DropDownWidthProperty
IsOpenProperty
DependencyProperty
Identifies the IsOpen property.
public static readonly DependencyProperty IsOpenProperty
KeepOpenProperty
DependencyProperty
Identifies the KeepOpen property.
public static readonly DependencyProperty KeepOpenProperty
PopupAnimationProperty
DependencyProperty
Identifies the PopupAnimation property.
public static readonly DependencyProperty PopupAnimationProperty
PopupPlacementTargetProperty
DependencyProperty
Identifies the PopupPlacementTarget property.
public static readonly DependencyProperty PopupPlacementTargetProperty
Properties
Gets or sets whether the popup opens when mouse hovers for pointed milliseconds. Value of zero means no auto open. This is a dependency property.
[Browsable(false)]
public TimeSpan AutoOpenDelay { get; set; }
Gets or sets whether the popup closes when the Enter key toggles. This is a dependency property.
public bool CloseOnEnter { get; set; }
Gets or sets whether the popup closes when the Escape key toggles. This is a dependency property.
public bool CloseOnEscape { get; set; }
Gets or sets whether the Popup should be closed when the user clicks on the DropDownContent. The closing is executed on MouseLeftButtonUp event of the Popup. This is a dependency property.
public bool CloseOnPopupMouseLeftButtonUp { get; set; }
Gets or sets the position of the drop down indicator. This is a dependency property.
public DropDownButtonPosition DropDownButtonPosition { get; set; }
Gets or sets the drop-down area's content. This is a dependency property.
public object DropDownContent { get; set; }
DropDownContentTemplate
DataTemplate
Gets or sets the template used to display the drop-down content of the button. This is a dependency property.
public DataTemplate DropDownContentTemplate { get; set; }
DropDownContentTemplateSelector
DataTemplateSelector
Gets or sets the template-selector used to display the drop-down content of the button. This is a dependency property.
public DataTemplateSelector DropDownContentTemplateSelector { get; set; }
Gets or sets the Height of the drop-down area. This is a dependency property.
public double DropDownHeight { get; set; }
Gets or sets the horizontal offset of the drop-down area. This is a dependency property.
public double DropDownHorizontalOffset { get; set; }
DropDownIndicatorVisibility
Visibility
Gets or sets whether the DropDown indicator is visible. This is a dependency property.
public Visibility DropDownIndicatorVisibility { get; set; }
Gets or sets the MaxHeight of the drop-down area. This is a dependency property.
public double DropDownMaxHeight { get; set; }
Gets or sets the MaxWidth of the drop-down area. This is a dependency property.
public double DropDownMaxWidth { get; set; }
Gets or sets the MinHeight of the drop-down area. This is a dependency property.
public double DropDownMinHeight { get; set; }
Gets or sets the MinWidth of the drop-down area. This is a dependency property.
public double DropDownMinWidth { get; set; }
Gets or sets the position of the drop-down area. This is a dependency property.
public PlacementMode DropDownPlacement { get; set; }
Gets or sets the vertical offset of the drop-down area. This is a dependency property.
public double DropDownVerticalOffset { get; set; }
Gets or sets the Width of the drop-down area. This is a dependency property.
public double DropDownWidth { get; set; }
Gets or sets whether the drop-down area is opened. This is a dependency property.
public bool IsOpen { get; set; }
Gets or sets whether the drop-down area should remain opened. This is a dependency property.
public bool KeepOpen { get; set; }
PopupAnimation
PopupAnimation
Gets or sets the animation that will be used for the popup element.
public PopupAnimation PopupAnimation { get; set; }
PopupPlacementTarget
FrameworkElement
Get/set the placement for the popup element.
public FrameworkElement PopupPlacementTarget { get; set; }
Methods
Initializes the position of the DropDown indicator and correct the placement of the Popup window.
protected virtual void ApplyDropDownButtonPosition()
Applies the configured popup offsets to the drop-down popup.
protected virtual void ApplyPopupOffsets()
Set the placement of the Popup window.
protected virtual void ApplyPopupPlacement()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
Implements:
Releases unmanaged resources and performs other cleanup operations before the RadDropDownButton is reclaimed by garbage collection.
protected override void Finalize()
Raises the event.
protected override void OnActivate()
Overrides:
Invoked whenever application code or internal processes (such as a rebuilding layout pass) call .
public override void OnApplyTemplate()
Overrides:
Invoke the base OnClick and toggle the IsOpen property.
protected override void OnClick()
Overrides:
OnCreateAutomationPeer()
AutomationPeer
Creates a RadDropDownButtonAutomationPeer.
protected override AutomationPeer OnCreateAutomationPeer()
AutomationPeer
Overrides:
Called when the DropDownContentTemplate property of a RadDropDownButton changes.
protected virtual void OnDropDownContentTemplateChanged(DataTemplate oldValue, DataTemplate newValue)
The old value of the DropDownContentTemplate property.
newValueDataTemplateThe new value of the DropDownContentTemplate property.
Called when the DropDownContentTemplateSelector property of a RadDropDownButton changes.
protected virtual void OnDropDownContentTemplateSelectorChanged(DataTemplateSelector oldValue, DataTemplateSelector newValue)
The old value of the DropDownContentTemplateSelector property.
newValueDataTemplateSelectorThe new value of the DropDownContentTemplateSelector property.
Called when the DropDownPlacement property of a RadDropDownButton changes.
protected virtual void OnDropDownPlacementChanged(DataTemplate oldValue, DataTemplate newValue)
The old value of the DropDownPlacement property.
newValueDataTemplateThe new value of the DropDownPlacement property.
Invocated when the hover happens.
protected override void OnHover()
Overrides:
Raises the event. This method is invoked whenever is set to true internally.
protected override void OnInitialized(EventArgs e)
The RoutedEventArgs that contains the event data.
Overrides:
Closes the popup on Escape key.
protected override void OnKeyDown(KeyEventArgs e)
Called when an element loses keyboard focus.
protected override void OnLostKeyboardFocus(KeyboardFocusChangedEventArgs e)
The event data for the event.
Provides class handling for the routed event that occurs when the left mouse button is pressed while the mouse pointer is over this control.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
The event data.
Invoked when an unhandled routed event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnMouseLeftButtonUp(MouseButtonEventArgs e)
The MouseButtonEventArgs that contains the event data. The event data reports that the left mouse button was released.
protected override void OnMouseWheel(MouseWheelEventArgs e)
Events
DropDownClosed
RoutedEventHandler
Occurs when the Popup is closed.
public event RoutedEventHandler DropDownClosed
DropDownOpened
RoutedEventHandler
Occurs when the Popup is opened.
public event RoutedEventHandler DropDownOpened
DropDownOpening
RoutedEventHandler
Occurs when the Popup is opening.
public event RoutedEventHandler DropDownOpening